For #4487 Set activity title only once in Bookmark fragment

Removed label from nav_graph that caused label to be set for each navigation
Removed title setting in onCreate() called for each navigation
Changed logic for checking current root when setting UI for normal mode
staging
mcarare 5 years ago committed by Emily Kager
parent 0275ca0693
commit f6a66562dd

@ -120,7 +120,6 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), BackHandler {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
activity?.title = getString(R.string.library_bookmarks)
setHasOptionsMenu(true)
}

@ -150,7 +150,7 @@ class BookmarkView(
private fun setUiForNormalMode(root: BookmarkNode?) {
super.setUiForNormalMode(
if (BookmarkRoot.Mobile.matches(root)) context.getString(R.string.library_bookmarks) else root?.title,
if (BookmarkRoot.Mobile.id == root?.guid) context.getString(R.string.library_bookmarks) else root?.title,
view.bookmark_list
)
}

@ -255,7 +255,6 @@
<fragment
android:id="@+id/bookmarkFragment"
android:name="org.mozilla.fenix.library.bookmarks.BookmarkFragment"
android:label="@string/library_bookmarks"
tools:layout="@layout/fragment_bookmark">
<argument
android:name="currentRoot"

Loading…
Cancel
Save