From e390fb4fc52fd06c779d713696af6d9343a26281 Mon Sep 17 00:00:00 2001 From: Alan Evans <48254818+alan-signal@users.noreply.github.com> Date: Mon, 11 Mar 2019 14:54:54 -0300 Subject: [PATCH] Fix ShareMessage toolbar back button. --- src/org/thoughtcrime/securesms/ShareActivity.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ShareActivity.java b/src/org/thoughtcrime/securesms/ShareActivity.java index 1035722b1a..d72d6c6041 100644 --- a/src/org/thoughtcrime/securesms/ShareActivity.java +++ b/src/org/thoughtcrime/securesms/ShareActivity.java @@ -36,6 +36,7 @@ import android.support.v7.widget.Toolbar; import org.thoughtcrime.securesms.conversation.ConversationActivity; import org.thoughtcrime.securesms.logging.Log; +import android.view.MenuItem; import android.view.View; import android.widget.ImageView; @@ -140,6 +141,16 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity } } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } + @Override public void onBackPressed() { if (searchToolbar.isVisible()) searchToolbar.collapse();