Bug 933420 - Update bookmark item view when title is edited. r=rnewman, a=bajaj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 03 Dec 2013 12:39:27 -0800
changeset 167622 9e736f2c0654d65834cd6feee4060602b1d2c0ee
parent 167621 47cb3fdf32f92d672e0a06a41641d9fbd0d4e3bb
child 167623 9b1397fd27156597a552a86af93dbd59db7e734e
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, bajaj
bugs933420
milestone27.0a2
Bug 933420 - Update bookmark item view when title is edited. r=rnewman, a=bajaj
mobile/android/base/home/TwoLinePageRow.java
--- a/mobile/android/base/home/TwoLinePageRow.java
+++ b/mobile/android/base/home/TwoLinePageRow.java
@@ -213,24 +213,24 @@ public class TwoLinePageRow extends Line
                 } else {
                     setBookmarkIcon(R.drawable.ic_url_bar_star);
                 }
             } else {
                 setBookmarkIcon(NO_ICON);
             }
         }
 
+        // Use the URL instead of an empty title for consistency with the normal URL
+        // bar view - this is the equivalent of getDisplayTitle() in Tab.java
+        setTitle(TextUtils.isEmpty(title) ? url : title);
+
         // No point updating the below things if URL has not changed. Prevents evil Favicon flicker.
         if (url.equals(mPageUrl)) {
             return;
         }
 
-        // Use the URL instead of an empty title for consistency with the normal URL
-        // bar view - this is the equivalent of getDisplayTitle() in Tab.java
-        setTitle(TextUtils.isEmpty(title) ? url : title);
-
         // Blank the Favicon, so we don't show the wrong Favicon if we scroll and miss DB.
         mFavicon.clearImage();
         mLoadFaviconJobId = Favicons.getSizedFaviconForPageFromLocal(url, mFaviconListener);
 
         updateDisplayedUrl(url);
     }
 }