mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix crash
This commit is contained in:
parent
d38b81f222
commit
1133cf45c3
@ -167,7 +167,7 @@ object ConversationMenuHelper {
|
|||||||
val group = DatabaseFactory.getGroupDatabase(context).getGroup(thread.address.toGroupString()).orNull()
|
val group = DatabaseFactory.getGroupDatabase(context).getGroup(thread.address.toGroupString()).orNull()
|
||||||
if (group?.isActive == false) { return }
|
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)
|
DatabaseFactory.getRecipientDatabase(context).setExpireMessages(thread, expirationTime)
|
||||||
val message = ExpirationTimerUpdate(expirationTime)
|
val message = ExpirationTimerUpdate(expirationTime)
|
||||||
message.recipient = thread.address.serialize()
|
message.recipient = thread.address.serialize()
|
||||||
@ -177,7 +177,7 @@ object ConversationMenuHelper {
|
|||||||
MessageSender.send(message, thread.address)
|
MessageSender.send(message, thread.address)
|
||||||
val activity = context as AppCompatActivity
|
val activity = context as AppCompatActivity
|
||||||
activity.invalidateOptionsMenu()
|
activity.invalidateOptionsMenu()
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun unblock(context: Context, thread: Recipient) {
|
private fun unblock(context: Context, thread: Recipient) {
|
||||||
|
@ -1,34 +1,35 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:orientation="vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center">
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
<cn.carbswang.android.numberpickerview.library.NumberPickerView
|
<cn.carbswang.android.numberpickerview.library.NumberPickerView
|
||||||
android:id="@+id/expiration_number_picker"
|
android:id="@+id/expiration_number_picker"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
app:npv_WrapSelectorWheel="false"
|
app:npv_WrapSelectorWheel="false"
|
||||||
app:npv_DividerColor="#cbc8ea"
|
app:npv_DividerColor="#cbc8ea"
|
||||||
app:npv_TextColorNormal="?conversation_number_picker_text_color_normal"
|
app:npv_TextColorNormal="@color/text"
|
||||||
app:npv_TextColorSelected="?conversation_number_picker_text_color_selected"
|
app:npv_TextColorSelected="@color/text"
|
||||||
app:npv_ItemPaddingVertical="20dp"
|
app:npv_ItemPaddingVertical="20dp"
|
||||||
app:npv_TextColorHint="@color/grey_600"
|
app:npv_TextColorHint="@color/grey_600"
|
||||||
app:npv_TextSizeNormal="16sp"
|
app:npv_TextSizeNormal="16sp"
|
||||||
app:npv_TextSizeSelected="16sp"
|
app:npv_TextSizeSelected="16sp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/expiration_details"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/expiration_number_picker"
|
|
||||||
android:minLines="3"
|
|
||||||
android:padding="20dp"
|
|
||||||
tools:text="Your messages will not expire."/>
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/expiration_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/expiration_number_picker"
|
||||||
|
android:minLines="3"
|
||||||
|
android:padding="20dp"
|
||||||
|
tools:text="Your messages will not expire."/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user