Bug 1300532 - Ensure old and new URL are ordered correctly to show prompt when entering ReaderView. r=sebastian, a=ritu
authorAndrzej Hunt <ahunt@mozilla.com>
Tue, 06 Sep 2016 15:52:09 -0700
changeset 350208 0bfcfe38984f3ce39f46570d722d5f0cedf32801
parent 350207 630e64bbd358a3035ce788368a618871e6469990
child 350209 72689dcc8fe2361742ec88282f820bf381e99174
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian, ritu
bugs1300532
milestone50.0a2
Bug 1300532 - Ensure old and new URL are ordered correctly to show prompt when entering ReaderView. r=sebastian, a=ritu MozReview-Commit-ID: 4Yql0m3JV6M
mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java
--- a/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java
+++ b/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java
@@ -36,17 +36,17 @@ public class ReaderViewBookmarkPromotion
     }
 
     @Override
     public void onTabChanged(Tab tab, Tabs.TabEvents msg, String data) {
         switch (msg) {
             case LOCATION_CHANGE:
                 // old url: data
                 // new url: tab.getURL()
-                final boolean enteringReaderMode = ReaderModeUtils.isEnteringReaderMode(tab.getURL(), data);
+                final boolean enteringReaderMode = ReaderModeUtils.isEnteringReaderMode(data, tab.getURL());
 
                 if (!hasEnteredReaderMode && enteringReaderMode) {
                     hasEnteredReaderMode = true;
                     promoteBookmarking();
                 }
 
                 break;
         }