Open PIG208 opened 1 week ago
Hey there, actually I am new to open source contribution I want to ask how can i help towards solving this issue ? Can you assign this issue to me?
Please take a look at the Zulip project's guide to getting involved with the code:
https://zulip.readthedocs.io/en/latest/contributing/contributing.html#your-first-codebase-contribution https://zulip.readthedocs.io/en/latest/contributing/contributing.html#picking-an-issue-to-work-on
This was brought up here: https://github.com/zulip/zulip-flutter/pull/1041#discussion_r1853230302.
UserTopicVisibilityPolicy.unknown
allows us to deserialize unknown enum values gracefully at the edge.https://github.com/zulip/zulip-flutter/blob/9e42f2694afffd3a40c7ca4786e8641622513350/lib/model/channel.dart#L216-L222
https://github.com/zulip/zulip-flutter/blob/9e42f2694afffd3a40c7ca4786e8641622513350/lib/model/channel.dart#L348-L350
However, while we manually declare that it wouldn't be possible that we encounter
UserTopicVisibilityPolicy.unknown
when accessing our internal data store (i.e.:ChannelStore
), our type doesn't agree with that, and require theUserTopicVisibilityPolicy.unknown
case to be handled for an exhaustive switch. We useassert
in such cases, but it is not supposed to be reachable (unless we have a bug).We should make sure that such an assertion is not needed. This might require removing
unknown
fromUserTopicVisibilityPolicy
.We specifically exclude
UserTopicVisibilityPolicy.unknown
at the edge. This may or may not apply to otherunknown
enum values. It would be good to do a sweep of those and decide if we need to follow-up on them as well.