mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
minor: Move code for web_public_stream_ids.
This commit is contained in:
@@ -4930,7 +4930,6 @@ def gather_subscriptions_helper(user_profile: UserProfile,
|
||||
|
||||
stream_dicts = [stream for stream in all_streams if stream['id'] in stream_ids]
|
||||
stream_hash = {}
|
||||
web_public_stream_ids = [stream['id'] for stream in all_streams if stream['is_web_public']]
|
||||
for stream in stream_dicts:
|
||||
stream_hash[stream["id"]] = stream
|
||||
|
||||
@@ -5025,7 +5024,8 @@ def gather_subscriptions_helper(user_profile: UserProfile,
|
||||
if user_profile.can_access_public_streams():
|
||||
never_subscribed_stream_ids = all_streams_id_set - sub_unsub_stream_ids
|
||||
else:
|
||||
never_subscribed_stream_ids = set(web_public_stream_ids) - sub_unsub_stream_ids
|
||||
web_public_stream_ids = {stream['id'] for stream in all_streams if stream['is_web_public']}
|
||||
never_subscribed_stream_ids = web_public_stream_ids - sub_unsub_stream_ids
|
||||
never_subscribed_streams = [ns_stream_dict for ns_stream_dict in all_streams
|
||||
if ns_stream_dict['id'] in never_subscribed_stream_ids]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user