From 7f828c56bdacceaccb3ac1d126bd1aff48e5a618 Mon Sep 17 00:00:00 2001 From: Zyuhel Date: Thu, 30 Nov 2017 18:07:59 +0300 Subject: [PATCH] use new variables for sound and title bar notifications --- src/App.vue | 2 +- src/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index 59406858d..06745c9b2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,7 +41,7 @@ export default { setInterval( (function (self) { return function () { - if (self.$store.state.newChats.total > 0 && (self.$store.state.notificationMethod === 'sound_and_title' || self.$store.state.notificationMethod === 'only_title')) { + if (self.$store.state.newChats.total > 0 && (self.$store.state.notifyBar)) { if (window.notify_amount !== self.$store.state.newChats.total) { if (window.notify_interval) { clearInterval(window.notify_interval) diff --git a/src/main.js b/src/main.js index 3deb8239c..d8e8b237d 100644 --- a/src/main.js +++ b/src/main.js @@ -236,14 +236,14 @@ const store = new Vuex.Store({ state.newChats['total'] = 0 } Vue.set(state.newChats, 'total', state.newChats['total'] + 1) - if (state.notificationMethod === 'only_sound' || state.notificationMethod === 'sound_and_title') { + if (state.notifySound) { try { document.getElementById('messageSound').play() } catch (e) { } } } else if (direction === 'to' && state.trackNewMessages && document.hidden) { - if (state.notificationMethod === 'only_sound' || state.notificationMethod === 'sound_and_title') { + if (state.notifySound) { try { document.getElementById('messageSound').play() } catch (e) {