Bug 863325 - Send correct result with Reader:Added message (r=bnicholson)
authorLucas Rocha <lucasr@mozilla.com>
Thu, 18 Apr 2013 18:07:55 +0100
changeset 129228 2dd4a898a3534efc084885825dc218727c498bad
parent 129227 c0e86fd53a375f8e843a4d44017d4948a539d5e1
child 129229 d214b2f5a61f06e0efbea845e1698f84e857ddb4
push id24562
push userryanvm@gmail.com
push dateFri, 19 Apr 2013 01:24:04 +0000
treeherdermozilla-central@f8d27fe5d7c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs863325
milestone23.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 863325 - Send correct result with Reader:Added message (r=bnicholson)
mobile/android/chrome/content/aboutReader.js
--- a/mobile/android/chrome/content/aboutReader.js
+++ b/mobile/android/chrome/content/aboutReader.js
@@ -207,19 +207,22 @@ AboutReader.prototype = {
 
     this._isReadingListItem = !this._isReadingListItem;
     this._updateToggleButton();
 
     if (this._isReadingListItem) {
       gChromeWin.Reader.storeArticleInCache(this._article, function(success) {
         dump("Reader:Add (in reader) success=" + success);
 
+        let result = (success ? gChromeWin.Reader.READER_ADD_SUCCESS :
+            gChromeWin.Reader.READER_ADD_FAILED);
+
         gChromeWin.sendMessageToJava({
           type: "Reader:Added",
-          success: success,
+          result: result,
           title: this._article.title,
           url: this._article.url,
         });
       }.bind(this));
     } else {
       gChromeWin.Reader.removeArticleFromCache(this._article.url , function(success) {
         dump("Reader:Remove (in reader) success=" + success);