Bug 1417918 - Save current keyword before navigating to SelectFolderFragment. r=jwu
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 17 Nov 2017 18:42:39 +0100
changeset 393096 345fd2d2bf806427935a2b466b8fc3ecb5d804ab
parent 393095 7cc1270bf794f1e2354a93fd8d508f121f959bcf
child 393097 81abb6b13cbce2178bb614a5b829d9cf905a8edf
push id55851
push usermozilla@buttercookie.de
push dateWed, 22 Nov 2017 18:08:23 +0000
treeherderautoland@345fd2d2bf80 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwu
bugs1417918, 1374251
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1417918 - Save current keyword before navigating to SelectFolderFragment. r=jwu Same issue as bug 1374251 now that keywords are editable as well. MozReview-Commit-ID: AJyDRAAN2IR
mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
--- a/mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/bookmarks/BookmarkEditFragment.java
@@ -170,19 +170,21 @@ public class BookmarkEditFragment extend
 
         folderText.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 if (bookmark == null) {
                     return;
                 }
 
-                // When coming back from SelectFolderFragment, we update view with data stored in `bookmark`,
-                // so before navigating, we have to save current title from nameText into `bookmark`.
+                // When coming back from SelectFolderFragment, we update the view with data stored in
+                // `bookmark`, so before navigating, we have to save the current title and keyword
+                // from the TextInputLayouts into `bookmark`.
                 bookmark.title = nameText.getText().toString();
+                bookmark.keyword = keywordText.getText().toString();
 
                 final SelectFolderFragment dialog = SelectFolderFragment.newInstance(bookmark.parentId, bookmark.id);
                 dialog.setTargetFragment(BookmarkEditFragment.this, 0);
                 dialog.show(getActivity().getSupportFragmentManager(), "select-bookmark-folder");
             }
         });
 
         return view;