revert MainActivity launchMode again (#4685)

This fixes
- The problem where Tusky drops your draft when you switch apps while
composing
- The problem where MainActivity does not restart when switching theme
in preferences

This adds back a bug where one can have multiple instances of
MainActivity which can behave weirdly when the active account was
switched after they were created. This bug is (unlike the timeline mixup
one) transient though, it will go away when restarting the app. As a
small mitigation MainActivity is finished when forwarding to
ComposeActivity (Tusky 25 behavior).
This commit is contained in:
Konrad Pozniak 2024-09-16 20:57:15 +02:00 committed by GitHub
parent f2a2c16464
commit a98154101b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,6 @@
android:name=".MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/SplashTheme">
<intent-filter>

View File

@ -576,6 +576,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
}
}
startActivity(composeIntent)
finish()
}
private fun setupDrawer(