Unverified Commit 8b96425f authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40095: Hide "Sign in to sync" in bookmarks

parent 1e7f1940
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -131,16 +131,9 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
    @ExperimentalCoroutinesApi
    @ExperimentalCoroutinesApi
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        super.onViewCreated(view, savedInstanceState)
        val accountManager = requireComponents.backgroundServices.accountManager
        consumeFrom(bookmarkStore) {
        consumeFrom(bookmarkStore) {
            bookmarkView.update(it)
            bookmarkView.update(it)

            bookmarkView.view.bookmark_folders_sign_in.isVisible = false
            // Only display the sign-in prompt if we're inside of the virtual "Desktop Bookmarks" node.
            // Don't want to pester user too much with it, and if there are lots of bookmarks present,
            // it'll just get visually lost. Inside of the "Desktop Bookmarks" node, it'll nicely stand-out,
            // since there are always only three other items in there. It's also the right place contextually.
            bookmarkView.view.bookmark_folders_sign_in.isVisible =
                it.tree?.guid == BookmarkRoot.Root.id && accountManager.authenticatedAccount() == null
        }
        }
    }
    }