1
0
Fork 0

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
master
mcarare 2019-11-04 17:12:30 +02:00 committed by Emily Kager
parent 0275ca0693
commit f6a66562dd
3 changed files with 1 additions and 3 deletions

View File

@ -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)
}

View File

@ -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
)
}

View File

@ -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"