From d189482e6eb3ca8f6fb6564e1aab8d4f58654da4 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Wed, 9 Oct 2024 13:59:41 -0500 Subject: [PATCH] fix: handle logged in logo visibility in landscape previously the two logos were assigned to the same variable, so toggling visibility on landscape mode hid one of the logos (the login one) but did not hide the other one (logged in one) now we maintain reference to both logos and toggle visibility of both in landscape mode --- AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.kt b/AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.kt index 6ac9ff1f9626..f38fc87f371b 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/MyAccount.kt @@ -59,6 +59,7 @@ open class MyAccount : AnkiActivity() { var toolbar: Toolbar? = null private lateinit var passwordLayout: TextInputLayout private lateinit var loginLogo: ImageView + private lateinit var loggedInLogo: ImageView // if the 'remove account' fragment is open, close it first private val onRemoveAccountBackCallback = object : OnBackPressedCallback(false) { @@ -111,8 +112,10 @@ open class MyAccount : AnkiActivity() { } if (isScreenSmall && this.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { loginLogo.visibility = View.GONE + loggedInLogo.visibility = View.GONE } else { loginLogo.visibility = View.VISIBLE + loggedInLogo.visibility = View.VISIBLE } onBackPressedDispatcher.addCallback(this, onRemoveAccountBackCallback) } @@ -262,7 +265,7 @@ open class MyAccount : AnkiActivity() { findViewById