mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
bookend: Simplify show_button check.
This lets us use a common function with the same logic, and thus delete the need for a comment explaining why we think the logic is correct.
This commit is contained in:
@@ -253,10 +253,7 @@ export class MessageList {
|
|||||||
show_button = false;
|
show_button = false;
|
||||||
} else if (!subscribed && !this.last_message_historical) {
|
} else if (!subscribed && !this.last_message_historical) {
|
||||||
just_unsubscribed = true;
|
just_unsubscribed = true;
|
||||||
|
show_button = stream_data.can_toggle_subscription(sub);
|
||||||
// For invite only streams hide the resubscribe button
|
|
||||||
// Hide button for guest users and spectators
|
|
||||||
show_button = !page_params.is_guest && !sub.invite_only;
|
|
||||||
}
|
}
|
||||||
this.view.render_trailing_bookend(
|
this.view.render_trailing_bookend(
|
||||||
stream_name,
|
stream_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user