From d5ebdc943c7bdf0c1e3c03a40978c22defab8b2f Mon Sep 17 00:00:00 2001 From: Tim Miller-Williams Date: Fri, 8 Nov 2019 00:04:25 +0000 Subject: [PATCH] Replace isNotified state with getter --- client/components/App.vue | 2 +- client/js/store.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/client/components/App.vue b/client/components/App.vue index 4a516101..f253246b 100644 --- a/client/components/App.vue +++ b/client/components/App.vue @@ -24,7 +24,7 @@ export default { computed: { viewportClasses() { return { - notified: this.$store.state.isNotified, + notified: this.$store.getters.highlightCount > 0, "menu-open": this.$store.state.sidebarOpen, "menu-dragging": this.$store.state.sidebarDragging, "userlist-open": this.$store.state.userlistOpen, diff --git a/client/js/store.js b/client/js/store.js index 4e8383ca..bfec9f2a 100644 --- a/client/js/store.js +++ b/client/js/store.js @@ -26,7 +26,6 @@ const store = new Vuex.Store({ isAutoCompleting: false, isConnected: false, isFileUploadEnabled: false, - isNotified: false, activeWindow: null, networks: [], pushNotificationState: "unsupported", @@ -61,9 +60,6 @@ const store = new Vuex.Store({ isFileUploadEnabled(state, isFileUploadEnabled) { state.isFileUploadEnabled = isFileUploadEnabled; }, - isNotified(state, payload) { - state.isNotified = payload; - }, activeWindow(state, payload) { state.activeWindow = payload; },