-
Notifications
You must be signed in to change notification settings - Fork 308
Fix unread topic case sensitivity. #1214
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
Fix unread topic case sensitivity. #1214
Conversation
31879bb
to
475f35b
Compare
475f35b
to
cc82251
Compare
12ab0a9
to
711d659
Compare
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.
Thanks @apoorvapendse for building this! Sorry this PR fell through the cracks.
One high-level comment below. Then see chat on what I think would be a good strategy for the solution, if you'd like to take that forward.
lib/model/unreads.dart
Outdated
// Maps lowercase topic names for lookup to one of the variants of the topic (case preserving). | ||
final Map<String, TopicName> topicMapper; |
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 won't have the right behavior because this map is shared between channels. So if there's one conversation at #islands > Ios
and another at #mobile > iOS
, then one or the other would get wrongly rendered with the other's casing.
Ah, I guess it was marked as draft until yesterday — so that at least explains why we didn't review it sooner 🙂. Anyway, thanks for sending it and for the update yesterday (and in chat). |
Yes, it was updated yesterday (had conflicts since the TopicName introduction). |
07f29ad
to
8eafd1d
Compare
Thanks for the revision! I see you mentioned in chat that this is ready for review again. This looks like broadly the right structure. A few high-level comments:
|
After a revision addressing that high-level feedback, this PR can go to maintainer review to get more detailed feedback. |
8eafd1d
to
74ed495
Compare
Thanks for the review @gnprice, |
Maps canoncalized topic names to a variant of the actual topic name. This is achieved by introducing a TopicMap class similar to FoldDict in web. I referred to the FoldDict code in zulip/zulip as @gnprice suggested. Thanks to the folks who wrote it! See https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Expected.20behaviour.20for.20case.20insensitivity.20for.20unreads.20.23F980/near/2076806 Fixes zulip#980.
74ed495
to
6f6c85d
Compare
Thanks for your work on this. It feels like there's still significant changes needed before we'd want to merge this; so in the interest of getting the issue resolved soon, I've asked @chrisbobbe to take over writing an implementation. For a brief high-level picture of some of the things that still need revision:
|
Fixes #980.
CZO Discussion.