subs: Update hash when unsubscribing from stream settings UI.

Previously, the unsubscribe logic just called
exports.show_subs_pane.nothing_selected() if one had been viewing the
edit UI for a stream that the user just unsubscribed from, which
clears the selection, but didn't update the hash or do other cleanup
logic.

We should instead be calling stream_edit.open_edit_panel_empty(),
which is the appropriate function for this purpose (and has
exports.show_subs_pane.nothing_selected as a subroutine).
This commit is contained in:
sahil839 2020-05-02 04:22:45 +05:30 committed by Tim Abbott
parent 9ef1c5b1a6
commit da4f80caaa
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ exports.remove_stream = function (stream_id) {
row.remove(); row.remove();
const sub = stream_data.get_sub_by_id(stream_id); const sub = stream_data.get_sub_by_id(stream_id);
if (stream_edit.is_sub_settings_active(sub)) { if (stream_edit.is_sub_settings_active(sub)) {
exports.show_subs_pane.nothing_selected(); stream_edit.open_edit_panel_empty();
} }
}; };