-
Notifications
You must be signed in to change notification settings - Fork 341
Rely on Zulip Server 6 APIs #1869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1b0abc
38ffcb7
944c068
886245f
d2d5613
13a2447
f52ce7f
59a2f67
76ceacd
ba9c636
1bc15bf
f9ff2cf
8baf4b5
a77e181
6adc9c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -453,12 +453,8 @@ class Unreads extends PerAccountStoreBase with ChangeNotifier { | |
final newlyUnreadInDms = <DmNarrow, QueueList<int>>{}; | ||
for (final messageId in event.messages) { | ||
final detail = event.messageDetails![messageId]; | ||
if (detail == null) { // TODO(log) if on Zulip 6.0+ | ||
// Happens as a bug in some cases before fixed in Zulip 6.0: | ||
// https://chat.zulip.org/#narrow/stream/378-api-design/topic/unreads.20in.20unsubscribed.20streams/near/1458467 | ||
// TODO(server-6) remove Zulip 6.0 comment | ||
continue; | ||
} | ||
if (detail == null) continue; // TODO(log) | ||
|
||
if (detail.mentioned == true) { | ||
mentions.add(messageId); | ||
} | ||
|
@@ -537,11 +533,7 @@ class Unreads extends PerAccountStoreBase with ChangeNotifier { | |
final topics = streams[streamId] ??= makeTopicKeyedMap(); | ||
topics.update(topic, | ||
ifAbsent: () => messageIds, | ||
// setUnion dedupes existing and incoming unread IDs, | ||
// so we tolerate zulip/zulip#22164, fixed in 6.0 | ||
// TODO(server-6) remove 6.0 comment | ||
(existing) => setUnion(existing, messageIds), | ||
); | ||
(existing) => setUnion(existing, messageIds)); | ||
} | ||
|
||
Comment on lines
534
to
538
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment appears to have been explaining why we had this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We discussed this in the office and decided to keep it, because it ensures the result is sorted when |
||
/// Remove [idsToRemove] from [streams] and [dms]. | ||
|
@@ -640,10 +632,6 @@ class Unreads extends PerAccountStoreBase with ChangeNotifier { | |
void _addAllInDm(QueueList<int> messageIds, DmNarrow dmNarrow) { | ||
dms.update(dmNarrow, | ||
ifAbsent: () => messageIds, | ||
// setUnion dedupes existing and incoming unread IDs, | ||
// so we tolerate zulip/zulip#22164, fixed in 6.0 | ||
// TODO(server-6) remove 6.0 comment | ||
(existing) => setUnion(existing, messageIds), | ||
); | ||
(existing) => setUnion(existing, messageIds)); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This replaced
muted_topics
. Grepping (withgit grep -i
muted.?topic`), we have a commented-out reference to that, above, which we can delete.Also a comment in the list of event types.