recent_conversations: Fix unread topics navigation behaviour.

When marking an unread topic as read with `unread` filter selected,
we don't need to move user a row down since removing the selected row
will automatically move the user down.

Without this, the user goes down twice which is not intended.
This commit is contained in:
Aman Agrawal 2023-03-16 10:40:28 +00:00 committed by Tim Abbott
parent 83e182a6fa
commit dbc2b2a839
1 changed files with 5 additions and 1 deletions

View File

@ -1263,7 +1263,11 @@ export function initialize() {
const topic = $elt.attr("data-topic-name");
unread_ops.mark_topic_as_read(stream_id, topic);
}
// If `unread` filter is selected, the focused topic row gets removed
// and we automatically move one row down.
if (!filters.has("unread")) {
change_focused_element($elt, "down_arrow");
}
});
$("body").on("keydown", ".on_hover_topic_read", ui_util.convert_enter_to_click);