mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
stream_settings: Don't remove stream_row if in "All Streams" tab.
If you were on "All Streams" tab and unsubscribed to a private stream, that stream row would momentarily disappear. If you click again on "All Streams" button, it would appear again. The problem was that the selector was finding two elements instead of just the tab element. To solve this we used a more specific selector to make sure we are getting the Subscribed tab only.
This commit is contained in:
parent
779daa5374
commit
77195f94c1
@ -107,7 +107,9 @@ exports.toggle_pin_to_top_stream = function (sub) {
|
||||
exports.is_subscribed_stream_tab_active = function () {
|
||||
// Returns true if "Subscribed" tab in stream settings is open
|
||||
// otherwise false.
|
||||
if ($("#subscriptions_table .search-container .tab-switcher .first").hasClass("selected")) {
|
||||
const tab = $(`#subscriptions_table .search-container .tab-switcher
|
||||
.first[data-tab-key=subscribed]`).expectOne();
|
||||
if (tab.hasClass("selected")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user