2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-13 07:10:28 +00:00

Bug 1835525 - Bookmark saves to the last select folder

This commit is contained in:
jackyzy823 2023-07-01 10:06:13 +08:00 committed by mergify[bot]
parent 14bc8bd93a
commit 646c0f1a04

View File

@ -150,6 +150,7 @@ import org.mozilla.fenix.ext.secure
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.home.HomeScreenViewModel
import org.mozilla.fenix.home.SharedViewModel
import org.mozilla.fenix.library.bookmarks.BookmarksSharedViewModel
import org.mozilla.fenix.perf.MarkersFragmentLifecycleCallbacks
import org.mozilla.fenix.settings.SupportUtils
import org.mozilla.fenix.settings.biometric.BiometricPromptFeature
@ -230,6 +231,7 @@ abstract class BaseBrowserFragment :
internal val sharedViewModel: SharedViewModel by activityViewModels()
private val homeViewModel: HomeScreenViewModel by activityViewModels()
private val bookmarksSharedViewModel: BookmarksSharedViewModel by activityViewModels()
private var currentStartDownloadDialog: StartDownloadDialog? = null
@ -1414,7 +1416,7 @@ abstract class BaseBrowserFragment :
// Save bookmark, then go to edit fragment
try {
val guid = bookmarksStorage.addItem(
BookmarkRoot.Mobile.id,
bookmarksSharedViewModel.selectedFolder?.guid ?: BookmarkRoot.Mobile.id,
url = sessionUrl,
title = sessionTitle,
position = null,