Skip to content

Commit 7f4918d

Browse files
committed
chore: minor changes
1 parent a1debc8 commit 7f4918d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/stream_feeds/lib/src/models/activity_data.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,12 @@ extension ActivityDataMutations on ActivityData {
332332
ownBookmarks: ownBookmarks ?? this.ownBookmarks,
333333
ownReactions: ownReactions ?? this.ownReactions,
334334
poll: updated.poll?.let((it) => poll?.updateWith(it) ?? it),
335-
currentFeed: updated.currentFeed == null
336-
? currentFeed
337-
: currentFeed?.updateWith(updated.currentFeed!) ??
338-
updated.currentFeed,
335+
// Workaround until the backend fixes the issue with missing currentFeed
336+
// in some WS events
337+
currentFeed: switch (updated.currentFeed) {
338+
final it? => currentFeed?.updateWith(it) ?? it,
339+
_ => currentFeed,
340+
},
339341
);
340342
}
341343

0 commit comments

Comments
 (0)