mirror of https://github.com/zulip/zulip.git
stream: Do not hide stream email on live update after unsubscribing.
We currently show stream emails for subscribed and unsubscribed streams in stream settings overlay and don't show them for never subscribed streams. There is a bug where we show the empty container without email on live update after unsubscribing and then we completely hide the email element after we switch the stream and come back to it again. But then we again show emails for unsubscribed streams after reload, to preserve the beahviour of showing the emails of unsubscribed streams. This commit fixes this bug by not hiding stream email on live update after unsubscribing and also showing them after switching between different streams and makes it consistent with showing emails for unsubscribed streams. Fixes #22308.
This commit is contained in:
parent
32615c81f2
commit
594724b834
|
@ -341,7 +341,6 @@ export function update_settings_for_unsubscribed(slim_sub) {
|
||||||
stream_ui_updates.update_regular_sub_settings(sub);
|
stream_ui_updates.update_regular_sub_settings(sub);
|
||||||
stream_ui_updates.update_change_stream_privacy_settings(sub);
|
stream_ui_updates.update_change_stream_privacy_settings(sub);
|
||||||
|
|
||||||
stream_data.update_stream_email_address(sub, "");
|
|
||||||
// If user unsubscribed from private stream then user cannot subscribe to
|
// If user unsubscribed from private stream then user cannot subscribe to
|
||||||
// stream without invitation and cannot add subscribers to stream.
|
// stream without invitation and cannot add subscribers to stream.
|
||||||
if (!stream_data.can_toggle_subscription(sub)) {
|
if (!stream_data.can_toggle_subscription(sub)) {
|
||||||
|
|
|
@ -124,8 +124,6 @@ export function update_regular_sub_settings(sub) {
|
||||||
$settings.find(".personal_settings").addClass("in");
|
$settings.find(".personal_settings").addClass("in");
|
||||||
} else {
|
} else {
|
||||||
$settings.find(".personal_settings").removeClass("in");
|
$settings.find(".personal_settings").removeClass("in");
|
||||||
// Clear email address widget
|
|
||||||
$settings.find(".email-address").html("");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue