mirror of https://github.com/zulip/zulip.git
Fix bug with (un)subscribe button showing on wrong narrow.
We had a bug for a while where if somebody subscribed you to a stream, and you were narrowed to another stream, we'd show a button in the "trailing bookend" to "Unsubscribe" from the current stream. I'm not sure how long we had that bug, but it was at least a couple months old, and I couldn't track down an issue for it. Now we make sure that the stream event for the subscription is related to the current narrow. Users should still see messages when they subscribe/unsubscribe themselves or when another user re-subscribes them to the stream that they are narrowed to.
This commit is contained in:
parent
33eb5ad237
commit
76ec9cf60b
|
@ -99,7 +99,7 @@ exports.mark_subscribed = function (sub, subscribers, color) {
|
||||||
|
|
||||||
subs.update_settings_for_subscribed(sub);
|
subs.update_settings_for_subscribed(sub);
|
||||||
|
|
||||||
if (current_msg_list.narrowed) {
|
if (narrow.is_for_stream_id(sub.stream_id)) {
|
||||||
current_msg_list.update_trailing_bookend();
|
current_msg_list.update_trailing_bookend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ exports.mark_unsubscribed = function (sub) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_msg_list.narrowed) {
|
if (narrow.is_for_stream_id(sub.stream_id)) {
|
||||||
current_msg_list.update_trailing_bookend();
|
current_msg_list.update_trailing_bookend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue