Fix ShareMessage toolbar back button.

This commit is contained in:
Alan Evans 2019-03-11 14:54:54 -03:00 committed by Alan Evans
parent a4ce77cbcc
commit e390fb4fc5

View File

@ -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();