polfan-server-js-client 0.2.109 → 0.2.110

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.
@@ -4,12 +4,7 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Bump version">
8
- <change beforePath="$PROJECT_DIR$/build/index.umd.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/build/types/index.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/build/types/index.d.ts" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/build/types/state-tracker/FollowedTopicsManager.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/build/types/state-tracker/FollowedTopicsManager.d.ts" afterDir="false" />
11
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
12
- <change beforePath="$PROJECT_DIR$/src/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.ts" afterDir="false" />
7
+ <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Unread topic counter in summary, bump version">
13
8
  <change beforePath="$PROJECT_DIR$/src/state-tracker/FollowedTopicsManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/state-tracker/FollowedTopicsManager.ts" afterDir="false" />
14
9
  </list>
15
10
  <option name="SHOW_DIALOG" value="false" />
@@ -235,15 +230,7 @@
235
230
  <workItem from="1783939298935" duration="21428000" />
236
231
  <workItem from="1784102649250" duration="12484000" />
237
232
  <workItem from="1784524117686" duration="79000" />
238
- <workItem from="1784562428378" duration="13241000" />
239
- </task>
240
- <task id="LOCAL-00059" summary="Update room on recipient user change">
241
- <option name="closed" value="true" />
242
- <created>1756804976724</created>
243
- <option name="number" value="00059" />
244
- <option name="presentableId" value="LOCAL-00059" />
245
- <option name="project" value="LOCAL" />
246
- <updated>1756804976724</updated>
233
+ <workItem from="1784562428378" duration="13985000" />
247
234
  </task>
248
235
  <task id="LOCAL-00060" summary="Fix websocket state error handling">
249
236
  <option name="closed" value="true" />
@@ -629,7 +616,15 @@
629
616
  <option name="project" value="LOCAL" />
630
617
  <updated>1784998935309</updated>
631
618
  </task>
632
- <option name="localTasksCounter" value="108" />
619
+ <task id="LOCAL-00108" summary="Unread topic counter in summary, bump version">
620
+ <option name="closed" value="true" />
621
+ <created>1785094230663</created>
622
+ <option name="number" value="00108" />
623
+ <option name="presentableId" value="LOCAL-00108" />
624
+ <option name="project" value="LOCAL" />
625
+ <updated>1785094230663</updated>
626
+ </task>
627
+ <option name="localTasksCounter" value="109" />
633
628
  <servers />
634
629
  </component>
635
630
  <component name="TypeScriptGeneratedFilesManager">
@@ -679,7 +674,6 @@
679
674
  </option>
680
675
  </component>
681
676
  <component name="VcsManagerConfiguration">
682
- <MESSAGE value="Added abuse reports and message redaction types" />
683
677
  <MESSAGE value="Added new permission" />
684
678
  <MESSAGE value="WIP: delete redacted messages" />
685
679
  <MESSAGE value="Improve EventTarget typings" />
@@ -704,7 +698,8 @@
704
698
  <MESSAGE value="Fix resolve window status after jump to message" />
705
699
  <MESSAGE value="Fix jumpTo when window is in LIVE state" />
706
700
  <MESSAGE value="Bump version" />
707
- <option name="LAST_COMMIT_MESSAGE" value="Bump version" />
701
+ <MESSAGE value="Unread topic counter in summary, bump version" />
702
+ <option name="LAST_COMMIT_MESSAGE" value="Unread topic counter in summary, bump version" />
708
703
  </component>
709
704
  <component name="XSLT-Support.FileAssociations.UIState">
710
705
  <expand />
@@ -2159,7 +2159,7 @@ var FollowedTopicsManager = /*#__PURE__*/function (_EventTarget) {
2159
2159
  key: "summarize",
2160
2160
  value: (function () {
2161
2161
  var _summarize = FollowedTopicsManager_asyncToGenerator(/*#__PURE__*/FollowedTopicsManager_regenerator().m(function _callee6(location) {
2162
- var cacheKey, roomIds, targetTopicId, rooms, mentionCount, unreadTopicCount, _iterator2, _step2, roomId, collection, _iterator3, _step3, _topic$mentionCount, topic, result, _t3, _t4;
2162
+ var cacheKey, roomIds, targetTopicId, rooms, mentionCount, unreadTopicCount, unreadRoomCount, _iterator2, _step2, roomId, collection, isRoomUnreadCount, _iterator3, _step3, _topic$mentionCount, topic, result, _t3, _t4;
2163
2163
  return FollowedTopicsManager_regenerator().w(function (_context6) {
2164
2164
  while (1) switch (_context6.p = _context6.n) {
2165
2165
  case 0:
@@ -2222,6 +2222,7 @@ var FollowedTopicsManager = /*#__PURE__*/function (_EventTarget) {
2222
2222
  case 9:
2223
2223
  mentionCount = 0;
2224
2224
  unreadTopicCount = 0;
2225
+ unreadRoomCount = 0;
2225
2226
  _iterator2 = FollowedTopicsManager_createForOfIteratorHelper(roomIds);
2226
2227
  _context6.p = 10;
2227
2228
  _iterator2.s();
@@ -2241,6 +2242,7 @@ var FollowedTopicsManager = /*#__PURE__*/function (_EventTarget) {
2241
2242
  }
2242
2243
  return _context6.a(3, 21);
2243
2244
  case 13:
2245
+ isRoomUnreadCount = false;
2244
2246
  _iterator3 = FollowedTopicsManager_createForOfIteratorHelper(collection.items);
2245
2247
  _context6.p = 14;
2246
2248
  _iterator3.s();
@@ -2257,6 +2259,10 @@ var FollowedTopicsManager = /*#__PURE__*/function (_EventTarget) {
2257
2259
  return _context6.a(3, 17);
2258
2260
  case 16:
2259
2261
  if (topic.isUnread) {
2262
+ if (!isRoomUnreadCount) {
2263
+ unreadRoomCount++;
2264
+ isRoomUnreadCount = true;
2265
+ }
2260
2266
  unreadTopicCount++;
2261
2267
  }
2262
2268
  mentionCount += (_topic$mentionCount = topic.mentionCount) !== null && _topic$mentionCount !== void 0 ? _topic$mentionCount : 0;
@@ -2292,6 +2298,7 @@ var FollowedTopicsManager = /*#__PURE__*/function (_EventTarget) {
2292
2298
  result = {
2293
2299
  mentionCount: mentionCount,
2294
2300
  unreadTopicCount: unreadTopicCount,
2301
+ unreadRoomCount: unreadRoomCount,
2295
2302
  isUnread: unreadTopicCount > 0
2296
2303
  };
2297
2304
  this.summariesCache.set(cacheKey, result);