From 99f53255801f01d2dab5093789fc24d726492f17 Mon Sep 17 00:00:00 2001 From: Brian Yencho Date: Sun, 21 Jan 2024 11:35:39 -0600 Subject: [PATCH] Ensure we only send ReceiveFirstIntent once (#701) --- .../main/java/com/x8bit/bitwarden/MainActivity.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt b/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt index 3e66d6d3b..44244a90d 100644 --- a/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt +++ b/app/src/main/java/com/x8bit/bitwarden/MainActivity.kt @@ -32,11 +32,13 @@ class MainActivity : AppCompatActivity() { installSplashScreen().setKeepOnScreenCondition { shouldShowSplashScreen } super.onCreate(savedInstanceState) - mainViewModel.trySendAction( - MainAction.ReceiveFirstIntent( - intent = intent, - ), - ) + if (savedInstanceState == null) { + mainViewModel.trySendAction( + MainAction.ReceiveFirstIntent( + intent = intent, + ), + ) + } // Within the app the language will change dynamically and will be managed // by the OS, but we need to ensure we properly set the language when