Bug 989876 - Keep updateTime field uptodate for gaia apps. r=fabrice, a=bajaj
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Tue, 22 Apr 2014 13:42:08 -0700
changeset 192024 93904cc2ad7f6d64f293d94ce7a451dc20c8f2d4
parent 192023 82b0d2c51ca49ee8b060a740c963a328ec182341
child 192025 67323979f7b93f59a5eb5dbae6fbe92e70d06d5f
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice, bajaj
bugs989876
milestone30.0a2
Bug 989876 - Keep updateTime field uptodate for gaia apps. r=fabrice, a=bajaj
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -539,16 +539,22 @@ this.DOMApplicationRegistry = {
 
           // Create a new localId.
           this.webapps[id].localId = this._nextLocalId();
 
           // Core apps are not removable.
           if (this.webapps[id].removable === undefined) {
             this.webapps[id].removable = false;
           }
+        } else {
+          // we fall into this case if the app is present in /system/b2g/webapps/webapps.json
+          // and in /data/local/webapps/webapps.json: this happens when updating gaia apps
+          // Confere bug 989876
+          this.webapps[id].updateTime = data[id].updateTime;
+          this.webapps[id].lastUpdateCheck = data[id].updateTime;
         }
       }
     }.bind(this)).then(null, Cu.reportError);
   },
 
   loadAndUpdateApps: function() {
     return Task.spawn(function() {
       let runUpdate = AppsUtils.isFirstRun(Services.prefs);