recent_topics: Add action to mark topic as read.

This commit is contained in:
Aman Agrawal
2020-05-23 00:25:29 +05:30
committed by Tim Abbott
parent 3c5adeee8a
commit bdaf4e1079
3 changed files with 14 additions and 2 deletions

View File

@@ -346,6 +346,15 @@ exports.initialize = function () {
muting_ui.mute(stream_id, topic);
});
// RECENT TOPICS
$('body').on('click', '.on_hover_topic_read', function (e) {
e.stopPropagation();
const stream_id = parseInt($(e.currentTarget).attr('data-stream-id'), 10);
const topic = $(e.currentTarget).attr('data-topic-name');
unread_ops.mark_topic_as_read(stream_id, topic);
});
// RECIPIENT BARS
function get_row_id_for_narrowing(narrow_link_elem) {