Browse Source

[core] Fix assist panel caching

Johan Ahlen 10 năm trước cách đây
mục cha
commit
fe0b968

+ 5 - 0
desktop/core/src/desktop/static/desktop/js/assistHelper.js

@@ -219,6 +219,11 @@
         snippet: ko.mapping.toJSON(snippet.getContext())
       }, function (data) {
         if (data.status == 0) {
+          cachedData[url] = {
+            timestamp: (new Date()).getTime(),
+            data: data
+          };
+          $.totalStorage("hue.assist." + self.getTotalStorageUserPrefix(), cachedData);
           successCallback(data);
         } else {
           errorCallback(data);