From 0fb462c88e92502b883089b1d76d4d1cecd94541 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 8 Mar 2018 15:46:05 +0200 Subject: [PATCH] Optimized notification dot state --- client/css/style.css | 2 +- client/js/utils.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index 83281765..6e74d29f 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -499,7 +499,7 @@ kbd { transition: opacity 0.2s; } -#viewport .lt.notified::after { +#viewport.notified .lt::after { opacity: 1; } diff --git a/client/js/utils.js b/client/js/utils.js index 6684ae71..11c84079 100644 --- a/client/js/utils.js +++ b/client/js/utils.js @@ -3,6 +3,7 @@ const $ = require("jquery"); const escape = require("css.escape"); const input = $("#input"); +const viewport = $("#viewport"); var serverHash = -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 - $("#viewport .lt").toggleClass("notified", newState); + viewport.toggleClass("notified", newState); } function confirmExit() {