diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 8b58befa85..d90a36c0d5 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -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) { diff --git a/static/styles/zulip.scss b/static/styles/zulip.scss index 93eaadda56..71161a8105 100644 --- a/static/styles/zulip.scss +++ b/static/styles/zulip.scss @@ -1116,7 +1116,8 @@ td.pointer { } .on_hover_topic_edit, -.on_hover_topic_mute { +.on_hover_topic_mute, +.on_hover_topic_read { opacity: 0.2; } @@ -1126,7 +1127,8 @@ td.pointer { .on_hover_topic_edit, .always_visible_topic_edit, -.on_hover_topic_mute { +.on_hover_topic_mute, +.on_hover_topic_read { &:hover { cursor: pointer; opacity: 1.0; diff --git a/static/templates/recent_topic_row.hbs b/static/templates/recent_topic_row.hbs index 28c6b4edf9..19abebd0d8 100644 --- a/static/templates/recent_topic_row.hbs +++ b/static/templates/recent_topic_row.hbs @@ -14,6 +14,7 @@