From 412ae60537e9886059b90bd95837176776c6b31d Mon Sep 17 00:00:00 2001 From: Grisha Kruglov Date: Fri, 18 Sep 2020 16:09:44 -0700 Subject: [PATCH] [fenix] Rename 'visitedAddBookmark' arg to a less confusing name --- .../library/bookmarks/addfolder/AddBookmarkFolderFragment.kt | 2 +- .../fenix/library/bookmarks/edit/EditBookmarkFragment.kt | 4 +++- .../bookmarks/selectfolder/SelectBookmarkFolderFragment.kt | 2 +- app/src/main/res/navigation/nav_graph.xml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/addfolder/AddBookmarkFolderFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/addfolder/AddBookmarkFolderFragment.kt index 9dbabbcbb7..18b4c6b216 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/addfolder/AddBookmarkFolderFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/addfolder/AddBookmarkFolderFragment.kt @@ -69,7 +69,7 @@ class AddBookmarkFolderFragment : Fragment(R.layout.fragment_edit_bookmark) { R.id.bookmarkAddFolderFragment, AddBookmarkFolderFragmentDirections .actionBookmarkAddFolderFragmentToBookmarkSelectFolderFragment( - true + allowCreatingNewFolder = true ) ) } diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/edit/EditBookmarkFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/edit/EditBookmarkFragment.kt index 4d25c59c70..bf07a482c0 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/edit/EditBookmarkFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/edit/EditBookmarkFragment.kt @@ -106,7 +106,9 @@ class EditBookmarkFragment : Fragment(R.layout.fragment_edit_bookmark) { nav( R.id.bookmarkEditFragment, EditBookmarkFragmentDirections - .actionBookmarkEditFragmentToBookmarkSelectFolderFragment() + .actionBookmarkEditFragmentToBookmarkSelectFolderFragment( + allowCreatingNewFolder = false + ) ) } } diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderFragment.kt index 86902eb410..9a825e9680 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderFragment.kt @@ -65,7 +65,7 @@ class SelectBookmarkFolderFragment : Fragment() { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { val args: SelectBookmarkFolderFragmentArgs by navArgs() - if (!args.visitedAddBookmark) { + if (!args.allowCreatingNewFolder) { inflater.inflate(R.menu.bookmarks_select_folder, menu) } } diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index c100c439f8..a4a49d2518 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -305,7 +305,7 @@ android:id="@+id/action_bookmarkSelectFolderFragment_to_bookmarkAddFolderFragment" app:destination="@id/bookmarkAddFolderFragment" />