Merge pull request #5110 from urbit/hm/mark-read-only-focused

ChatWindow: only dismiss if tab has focus
This commit is contained in:
Liam Fitzgerald 2021-07-15 08:56:23 +10:00 committed by GitHub
commit 1aeeb27717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,8 @@ class ChatWindow extends Component<
}
if(this.unreadSet &&
this.dismissedInitialUnread() &&
this.virtualList!.startOffset() < 5) {
this.virtualList!.startOffset() < 5 &&
document.hasFocus()) {
this.props.dismissUnread();
}
}