Fix crash

This commit is contained in:
Niels Andriesse 2021-06-29 13:48:46 +10:00
parent d38b81f222
commit 1133cf45c3
2 changed files with 31 additions and 30 deletions

View File

@ -167,7 +167,7 @@ object ConversationMenuHelper {
val group = DatabaseFactory.getGroupDatabase(context).getGroup(thread.address.toGroupString()).orNull()
if (group?.isActive == false) { return }
}
ExpirationDialog.show(context, thread.expireMessages, ExpirationDialog.OnClickListener { expirationTime: Int ->
ExpirationDialog.show(context, thread.expireMessages) { expirationTime: Int ->
DatabaseFactory.getRecipientDatabase(context).setExpireMessages(thread, expirationTime)
val message = ExpirationTimerUpdate(expirationTime)
message.recipient = thread.address.serialize()
@ -177,7 +177,7 @@ object ConversationMenuHelper {
MessageSender.send(message, thread.address)
val activity = context as AppCompatActivity
activity.invalidateOptionsMenu()
})
}
}
private fun unblock(context: Context, thread: Recipient) {

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
@ -13,8 +14,8 @@
android:layout_alignParentTop="true"
app:npv_WrapSelectorWheel="false"
app:npv_DividerColor="#cbc8ea"
app:npv_TextColorNormal="?conversation_number_picker_text_color_normal"
app:npv_TextColorSelected="?conversation_number_picker_text_color_selected"
app:npv_TextColorNormal="@color/text"
app:npv_TextColorSelected="@color/text"
app:npv_ItemPaddingVertical="20dp"
app:npv_TextColorHint="@color/grey_600"
app:npv_TextSizeNormal="16sp"
@ -22,7 +23,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/expiration_details"
<TextView
android:id="@+id/expiration_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/expiration_number_picker"
@ -30,5 +32,4 @@
android:padding="20dp"
tools:text="Your messages will not expire."/>
</RelativeLayout>