Skip to content

Commit 9291beb

Browse files
committed
fix back press from file details
Signed-off-by: alperozturk <[email protected]>
1 parent 74e9900 commit 9291beb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ class FileDisplayActivity :
11811181

11821182
isDrawerOpen -> {
11831183
before()
1184-
onBackPressedDispatcher.onBackPressed()
1184+
closeDrawer()
11851185
after()
11861186
}
11871187

@@ -1278,20 +1278,20 @@ class FileDisplayActivity :
12781278

12791279
if (leftFragment is UnifiedSearchFragment) {
12801280
showSortListGroup(false)
1281-
onBackPressedDispatcher.onBackPressed()
1281+
supportFragmentManager.popBackStack()
12821282
}
12831283
}
12841284

12851285
/**
12861286
* Use this method when want to pop the fragment on back press. It resets Scrolling (See
12871287
* [with true][.resetScrolling] and pop the visibility for sortListGroup (See
1288-
* [with false][.showSortListGroup]. At last call to onBackPressedDispatcher.onBackPressed()
1288+
* [with false][.showSortListGroup]. At last call to supportFragmentManager.popBackStack()
12891289
*/
12901290
private fun popBack() {
12911291
binding.fabMain.setImageResource(R.drawable.ic_plus)
12921292
resetScrolling(true)
12931293
showSortListGroup(false)
1294-
onBackPressedDispatcher.onBackPressed()
1294+
supportFragmentManager.popBackStack()
12951295
}
12961296

12971297
override fun onSaveInstanceState(outState: Bundle) {

0 commit comments

Comments
 (0)