fix to close media view when press back button

when starting media tab from conversation info, the back button opened media tab again. to fix this FLAG_ACTIVITY_CLEAR_TOP was set as flag

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-04-29 13:21:30 +02:00
parent aa5e34b3f9
commit b22ed7399d
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 6 additions and 5 deletions

View File

@ -96,11 +96,6 @@
android:name="android.max_aspect"
android:value="10" />
<activity
android:name=".activities.SharedItemsActivity"
android:exported="false"
android:theme="@style/AppTheme"/>
<activity
android:name=".activities.MainActivity"
android:label="@string/nc_app_name"
@ -172,6 +167,10 @@
android:theme="@style/TakePhotoTheme"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".activities.SharedItemsActivity"
android:theme="@style/AppTheme"/>
<receiver android:name=".receivers.PackageReplacedReceiver">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />

View File

@ -187,6 +187,8 @@ class ConversationInfoController(args: Bundle) :
private fun showSharedItems() {
val intent = Intent(activity, SharedItemsActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
intent.putExtra(BundleKeys.KEY_CONVERSATION_NAME, conversation?.displayName)
intent.putExtra(BundleKeys.KEY_ROOM_TOKEN, conversationToken)
intent.putExtra(BundleKeys.KEY_USER_ENTITY, conversationUser as Parcelable)