From 4d916eb1067c9ed24c1a2afaa829b7152974befd Mon Sep 17 00:00:00 2001 From: kyori19 Date: Tue, 11 Jun 2019 02:40:07 +0900 Subject: [PATCH] Fix onBackPressed never called in ComposeActivity (#1317) --- .../main/java/com/keylesspalace/tusky/ComposeActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index c8ed3f8f..2cd08828 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -1655,6 +1655,11 @@ public final class ComposeActivity } } + if (keyCode == KeyEvent.KEYCODE_BACK) { + onBackPressed(); + return true; + } + return super.onKeyDown(keyCode, event); }