Merge pull request #2170 from thelounge/xpaw/optimize-notified

Optimized notification dot state
This commit is contained in:
Jérémie Astori 2018-03-08 19:04:51 -05:00 committed by GitHub
commit d0ac101b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -499,7 +499,7 @@ kbd {
transition: opacity 0.2s; transition: opacity 0.2s;
} }
#viewport .lt.notified::after { #viewport.notified .lt::after {
opacity: 1; opacity: 1;
} }

View File

@ -3,6 +3,7 @@
const $ = require("jquery"); const $ = require("jquery");
const escape = require("css.escape"); const escape = require("css.escape");
const input = $("#input"); const input = $("#input");
const viewport = $("#viewport");
var serverHash = -1; // eslint-disable-line no-var var serverHash = -1; // eslint-disable-line no-var
var lastMessageId = -1; // eslint-disable-line no-var var lastMessageId = -1; // eslint-disable-line no-var
@ -105,7 +106,7 @@ function toggleNotificationMarkers(newState) {
} }
// Toggles a dot on the menu icon when there are unread notifications // Toggles a dot on the menu icon when there are unread notifications
$("#viewport .lt").toggleClass("notified", newState); viewport.toggleClass("notified", newState);
} }
function confirmExit() { function confirmExit() {