mirror of https://github.com/zulip/zulip.git
left_sidebar: Avoid zooming out when toggling stream subscription.
In this commit, we have replaced `build_stream_list()` with `update_streams_sidebar()`. This change avoids zooming out from the "more topics" view when toggling your subscription to a different stream. It also triggers a forced rerender of the left sidebar only when unsubscribing from the currently active stream. The stream list will be updated once the user zooms out.
This commit is contained in:
parent
30ab2781b1
commit
7036b0d466
|
@ -147,14 +147,13 @@ function get_search_term() {
|
|||
|
||||
export function add_sidebar_row(sub) {
|
||||
create_sidebar_row(sub);
|
||||
build_stream_list();
|
||||
stream_cursor.redraw();
|
||||
update_streams_sidebar();
|
||||
}
|
||||
|
||||
export function remove_sidebar_row(stream_id) {
|
||||
stream_sidebar.remove_row(stream_id);
|
||||
build_stream_list();
|
||||
stream_cursor.redraw();
|
||||
const force_rerender = stream_id === topic_list.active_stream_id();
|
||||
update_streams_sidebar(force_rerender);
|
||||
}
|
||||
|
||||
export function create_initial_sidebar_rows() {
|
||||
|
|
Loading…
Reference in New Issue