From 65168cd5bfcd1a2b3283611a36e03f2e738da1ee Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 16 Apr 2024 16:22:03 -0300 Subject: [PATCH] Reimplement back button behavior --- .../app/src/main/java/chat/rocket/reactnative/MainActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/app/src/main/java/chat/rocket/reactnative/MainActivity.kt b/android/app/src/main/java/chat/rocket/reactnative/MainActivity.kt index e8521fcd5..98e3feb22 100644 --- a/android/app/src/main/java/chat/rocket/reactnative/MainActivity.kt +++ b/android/app/src/main/java/chat/rocket/reactnative/MainActivity.kt @@ -30,6 +30,10 @@ class MainActivity : ReactActivity() { super.onCreate(null) } + override fun invokeDefaultOnBackPressed() { + moveTaskToBack(true) + } + // from react-native-orientation override fun onConfigurationChanged(newConfig: Configuration) { super.onConfigurationChanged(newConfig)