Bug 1417918 - Save current keyword before navigating to SelectFolderFragment. r?jwu draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 17 Nov 2017 18:42:39 +0100
changeset 699765 3def65414dba0d2e7a7ba443e4873a985f0ac893
parent 699764 56d8b12ab2ae0cb19185683218325710f8c9459a
child 699777 9630749dd79ddfb9ee8319bbeeb4c6bc4437643d
push id89664
push usermozilla@buttercookie.de
push dateFri, 17 Nov 2017 17:44:44 +0000
reviewersjwu
bugs1417918, 1374251
milestone59.0a1
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;