Skip to content

Commit

Permalink
[FIX] Clear unread red line when the ESC key is pressed (#16668)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Feb 20, 2020
1 parent af75981 commit 9bd8722
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/ui-utils/client/lib/readMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ Meteor.startup(function() {
.on('keyup', (e) => {
const key = e.which;
if (key === 27) { // ESCAPE KEY
readMessage.readNow();
const rid = Session.get('openedRoom');
if (!rid) {
return;
}
readMessage.readNow(rid);
readMessage.refreshUnreadMark(rid);
}
});
});

0 comments on commit 9bd8722

Please sign in to comment.