 
   putAppsToAppStorage:(apps, callback = noop)->
     warn "calling putAppsToAppStorage:", apps
-    apps or= @constructor.manifests
+    apps or= @getManifests()
     @appStorage.setValue 'apps', apps, -> callback()
 
   invalidateDeletedApps:(deletedApps, force=no, callback)->


  fetchAppFromFs:(appName, cb)->

    manifests = @constructor.manifests
    appsPath = "/home/#{KD.nick()}/Applications/"
    suffix   = ".kdapp/manifest.json"


  fetchApps:(callback)->

    @appStorage.ready =>
      manifests = @getManifests()
      if Object.keys(manifests).length > 0
        callback null, manifests
      else
        @fetchAppsFromDb (err, apps)=>
          if err and not @_loadedOnce
