From 3e6bfe8776d5cdb43f4f1c1a687b079eb2b1a65d Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Wed, 18 Dec 2024 09:17:46 +0100 Subject: [PATCH] make sure MainActivity doesn't hide other activities when launcher icon is clicked again (#4813) closes #4789 this time for real, hopefully, maybe also set `alwaysRetainTaskState` for good measure > `android:alwaysRetainTaskState` Whether the state of the task that the activity is in is always maintained by the system. `"true"` if it is, and `"false"` if the system can reset the task to its initial state in certain situations. The default value is `"false"`. This attribute is meaningful only for the root activity of a task. It's ignored for all other activities. > Normally, the system clears a task, removing all activities from the stack above the root activity, in certain situations when the user re-selects that task from the home screen. Typically, this is done if the user hasn't visited the task for a certain amount of time, such as 30 minutes. > However, when this attribute is `"true"`, users always return to the task in its last state, regardless of how they get there. This is useful in an application like a web browser where there is a lot of state, such as multiple open tabs, that users don't want to lose. https://developer.android.com/guide/topics/manifest/activity-element#always --- app/src/main/AndroidManifest.xml | 2 ++ app/src/main/java/com/keylesspalace/tusky/MainActivity.kt | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c5742d73a..7b00c6490 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -41,6 +41,7 @@ @@ -105,6 +106,7 @@