@stream-io/feeds-client 0.3.9 → 0.3.10

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.
@@ -3862,7 +3862,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
3862
3862
  };
3863
3863
  return result;
3864
3864
  };
3865
- const version = "0.3.9";
3865
+ const version = "0.3.10";
3866
3866
  class ApiClient {
3867
3867
  constructor(apiKey, tokenManager, connectionIdManager, options) {
3868
3868
  this.apiKey = apiKey;
@@ -5225,6 +5225,9 @@ const sharedUpdateActivity$6 = ({
5225
5225
  if (eventBelongsToCurrentUser) {
5226
5226
  newOwnBookmarks = [...newOwnBookmarks, event.bookmark];
5227
5227
  }
5228
+ if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5229
+ event.bookmark.activity.current_feed = currentActivity.current_feed;
5230
+ }
5228
5231
  return {
5229
5232
  ...event.bookmark.activity,
5230
5233
  own_bookmarks: newOwnBookmarks,
@@ -5298,6 +5301,9 @@ const sharedUpdateActivity$5 = ({
5298
5301
  (bookmark) => !isSameBookmark(bookmark, event.bookmark)
5299
5302
  );
5300
5303
  }
5304
+ if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5305
+ event.bookmark.activity.current_feed = currentActivity.current_feed;
5306
+ }
5301
5307
  return {
5302
5308
  ...event.bookmark.activity,
5303
5309
  own_bookmarks: newOwnBookmarks,
@@ -5533,6 +5539,9 @@ const updateActivity = ({
5533
5539
  currentActivity,
5534
5540
  newActivtiy
5535
5541
  }) => {
5542
+ if (!newActivtiy.current_feed && newActivtiy.feeds.length === 1 && currentActivity.current_feed) {
5543
+ newActivtiy.current_feed = currentActivity.current_feed;
5544
+ }
5536
5545
  return {
5537
5546
  ...newActivtiy,
5538
5547
  own_reactions: currentActivity.own_reactions,
@@ -7664,4 +7673,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
7664
7673
  exports.shouldUpdateState = shouldUpdateState;
7665
7674
  exports.uniqueArrayMerge = uniqueArrayMerge;
7666
7675
  exports.updateEntityInArray = updateEntityInArray;
7667
- //# sourceMappingURL=feeds-client-DvR7ZYd1.js.map
7676
+ //# sourceMappingURL=feeds-client-CqcICDIi.js.map