From 4b0179f859b5edabdd4e29b8173500db5f4ba620 Mon Sep 17 00:00:00 2001 From: Anton Chekulaev Date: Fri, 18 Sep 2020 13:58:34 +1000 Subject: [PATCH] Defualt height for attachment selector. --- .../securesms/conversation/ConversationActivity.java | 6 ++++++ .../securesms/loki/protocol/ClosedGroupsProtocol.kt | 1 + 2 files changed, 7 insertions(+) diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index 25713b7e2c..7325472a20 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -475,6 +475,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } collapsedKeyboardHeight = Math.min(collapsedKeyboardHeight, height); keyboardHeight = expandedKeyboardHeight - collapsedKeyboardHeight; + + // Use 300dp if the keyboard wasn't opened yet. + if (keyboardHeight == 0) { + keyboardHeight = (int)(300f * getResources().getDisplayMetrics().density); + } }); } @@ -493,6 +498,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity @Override protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); Log.i(TAG, "onNewIntent()"); if (isFinishing()) { diff --git a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt index 2ff6e2a137..4ca6478ac1 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/ClosedGroupsProtocol.kt @@ -33,6 +33,7 @@ import org.whispersystems.signalservice.loki.utilities.hexEncodedPublicKey import org.whispersystems.signalservice.loki.utilities.toHexString import java.io.IOException import java.util.* +import kotlin.jvm.Throws object ClosedGroupsProtocol { val isSharedSenderKeysEnabled = false