zulip / zulip-flutter

Future Zulip client using Flutter
Apache License 2.0
159 stars 131 forks source link

Update message list on muting/unmuting a stream or topic #421

Closed gnprice closed 3 weeks ago

gnprice commented 9 months ago

In my first implementation of stream and topic muting #346, I intend to leave in place one missing form of event update: if you have a message list you're already looking at (or already on the navigation stack), and then you mute or unmute a stream or topic so that it should cause some messages to disappear or appear in that message list, it won't notice that it should update.

This isn't fundamentally hard — just requires a bit of wiring up of the information — but it'll be a little bit of refactoring, and there's already enough refactoring going on in my draft for #346 that I'd like to keep the complexity down for now.

We don't yet offer UI within the app for muting or unmuting streams and topics (that's #347 and #348), so it won't currently be easy to actually run into this issue.

chrisbobbe commented 9 months ago

Unsubscribing from a stream means clearing out its mute state (isMuted is stored on the subscription). I wonder if that means message lists should also sometimes update on SubscriptionRemoveEvents.

I don't think it's possible for a stream to be muted at the time you subscribe to it; i.e., the subscription has isMuted: true in the SubscriptionAddEvent. But if it is, we should handle that too.

gnprice commented 1 month ago

I wonder if that means message lists should also sometimes update on SubscriptionRemoveEvents.

Yeah, seems right. Filed that as #821.