recent_topics_ui: Use topics_widget to get number of current rows.

I think this should be more reliable and faster.
This commit is contained in:
Aman Agrawal
2022-10-19 18:38:18 +00:00
committed by Tim Abbott
parent 89e4233b68
commit 198f31fbea

View File

@@ -802,8 +802,7 @@ export function hide() {
}
function is_focus_at_last_table_row() {
const $topic_rows = $("#recent_topics_table table tbody tr");
return row_focus === $topic_rows.length - 1;
return row_focus >= topics_widget.get_current_list().length - 1;
}
function has_unread(row) {