@fluid-topics/ft-app-context 2.0.35 → 2.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { FtUserAssetType } from "@fluid-topics/public-api";
2
- import { deepEqual, FtReduxStore } from "@fluid-topics/ft-wc-utils";
1
+ import { FtUserAssetType, } from "@fluid-topics/public-api";
2
+ import { deepEqual, FtReduxStore, } from "@fluid-topics/ft-wc-utils";
3
3
  import { SavedSearchesService } from "../services/SavedSearchesService";
4
4
  import { BookmarksService } from "../services/BookmarksService";
5
5
  import { ftAppInfoStore } from "./FtAppInfoStore";
@@ -146,13 +146,13 @@ export class UserAssetsActions {
146
146
  }
147
147
  async loadAssetCount(assetType) {
148
148
  const assetCount = await this.assetCountsService.getUserAssetCount(assetType);
149
- if (assetCount) {
149
+ if (assetCount && ftUserAssetsStore.getState().assetCounts.allAsset[assetType] !== assetCount.count) {
150
150
  ftUserAssetsStore.actions.setAssetCount({ assetCount: assetCount });
151
151
  }
152
152
  }
153
153
  async loadBookmarkByMapId(mapId) {
154
154
  const bookmarkCount = await this.assetCountsService.getUserBookmarkCountByMap(mapId);
155
- if (bookmarkCount) {
155
+ if (bookmarkCount && ftUserAssetsStore.getState().assetCounts.bookmarkByMap[mapId] !== bookmarkCount.count) {
156
156
  ftUserAssetsStore.actions.setBookmarkCountByMap({ count: bookmarkCount.count, mapId: mapId });
157
157
  }
158
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-app-context",
3
- "version": "2.0.35",
3
+ "version": "2.0.37",
4
4
  "description": "Global application context for Fluid Topics integrations",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "2.0.35",
22
+ "@fluid-topics/ft-wc-utils": "2.0.37",
23
23
  "lit": "3.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@fluid-topics/public-api": "1.0.123"
26
+ "@fluid-topics/public-api": "1.0.124"
27
27
  },
28
- "gitHead": "b72f0f694a390c77ea515a13afc89abb277cd5f0"
28
+ "gitHead": "ef1f68e09e0331293931458a6479b551dcc4cecc"
29
29
  }