Merge pull request #642 from rmullin7286/master

Made ThreadActivity launch in singleTop mode and added onNewIntent.
This commit is contained in:
Tibor Kaputa 2023-05-18 17:58:35 +02:00 committed by GitHub
commit abedc2a18a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -56,7 +56,8 @@
android:configChanges="orientation" android:configChanges="orientation"
android:exported="false" android:exported="false"
android:parentActivityName=".activities.MainActivity" android:parentActivityName=".activities.MainActivity"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize"
android:launchMode="singleTop" />
<activity <activity
android:name=".activities.NewConversationActivity" android:name=".activities.NewConversationActivity"

View File

@ -108,6 +108,12 @@ class ThreadActivity : SimpleActivity() {
private var isAttachmentPickerVisible = false private var isAttachmentPickerVisible = false
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
finish()
startActivity(intent)
}
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true isMaterialActivity = true
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)