Skip to content

Commit 156f54a

Browse files
committed
Bug 2024810 - Fixed last saved folder cache updating
1 parent 984b8ae commit 156f54a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/bookmarks/BookmarksMiddleware.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,7 @@ internal class BookmarksMiddleware(
243243
}
244244

245245
preReductionState.bookmarksEditBookmarkState != null -> {
246-
if (!getNavController().popBackStack()) {
247-
exitBookmarks()
248-
}
246+
val popped = getNavController().popBackStack()
249247
lifecycleScope.launch {
250248
preReductionState.createBookmarkInfo()?.also {
251249
val result = bookmarksStorage.updateNode(
@@ -261,6 +259,9 @@ internal class BookmarksMiddleware(
261259
}
262260
}
263261
store.tryDispatchLoadFor(preReductionState.currentFolder.guid)
262+
if (!popped) {
263+
exitBookmarks()
264+
}
264265
}
265266
}
266267
// list screen cases

0 commit comments

Comments
 (0)