From e13a02e219f42dbcdea09babcff3a3bef9d293f1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 7 Oct 2020 01:42:58 +0300 Subject: [PATCH] ChatActivity: fix crash, fix sticker button enabling conditions --- .../com/keylesspalace/tusky/components/chat/ChatActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/chat/ChatActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/chat/ChatActivity.kt index 176ed52f..29c07e9e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/chat/ChatActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/chat/ChatActivity.kt @@ -385,9 +385,9 @@ class ChatActivity: BottomSheetActivity(), enableSendButton() enableButton(attachmentButton, notHaveMedia, notHaveMedia) - enableButton(stickerButton, haveStickers, haveStickers) + enableButton(stickerButton, haveStickers && notHaveMedia, haveStickers && notHaveMedia) - if(!it.isNotEmpty()) { + if(!notHaveMedia) { val media = it[0] when(media.type) {