mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-27 01:30:09 +02:00
Merge pull request #1040 from thelounge/focusin-reset-notifications
Reset notification markers on document focus
This commit is contained in:
commit
5bc1be1f39
|
@ -1595,14 +1595,11 @@ $(function() {
|
||||||
$("#viewport .lt").toggleClass("notified", newState);
|
$("#viewport .lt").toggleClass("notified", newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener(
|
$(document).on("visibilitychange focus", () => {
|
||||||
"visibilitychange",
|
if (sidebar.find(".highlight").length === 0) {
|
||||||
function() {
|
toggleNotificationMarkers(false);
|
||||||
if (sidebar.find(".highlight").length === 0) {
|
|
||||||
toggleNotificationMarkers(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
|
||||||
// Only start opening socket.io connection after all events have been registered
|
// Only start opening socket.io connection after all events have been registered
|
||||||
socket.open();
|
socket.open();
|
||||||
|
|
Loading…
Reference in a new issue