Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

inbox: Focus on entire row instead of stream name on `show`.

Aman Agrawal0ad47b5d09af
diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.js
index 6a031632fbb..b3347ad07f2 100644
--- a/web/src/inbox_ui.js
+++ b/web/src/inbox_ui.js
@@ -71,6 +71,14 @@ function should_include_muted() {
}
export function show() {
+ // Avoid setting col_focus to recipient when moving to inbox from other narrows.
+ // We prefer to focus entire row instead of stream name for inbox-header.
+ // Since inbox-row doesn't has a collapse button, focus on COLUMNS.COLLAPSE_BUTTON
+ // is same as focus on COLUMNS.RECIPIENT. See `set_list_focus` for details.
+ if (col_focus === COLUMNS.RECIPIENT) {
+ col_focus = COLUMNS.COLLAPSE_BUTTON;
+ }
+
views_util.show({
highlight_view_in_left_sidebar: left_sidebar_navigation_area.highlight_inbox_view,
$view: $("#inbox-view"),