diff options
author | Marco Ambrosini <marcoambrosini@pm.me> | 2020-01-08 14:30:15 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-01-08 19:24:25 +0300 |
commit | 4c72e2fe257179412a686e3140b6d7fcb0344838 (patch) | |
tree | 90fd00354f182e0f4961881179be5238aa333426 /src | |
parent | b6e40d0dcbb84b3a50fe87c077ab4e6f286e1468 (diff) |
Use visibility store
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'src')
-rw-r--r-- | src/App.vue | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index 1762f272f..e3b155a28 100644 --- a/src/App.vue +++ b/src/App.vue @@ -59,11 +59,13 @@ export default { savedLastMessageMap: {}, defaultPageTitle: false, loading: false, - windowIsVisible: true, } }, computed: { + windowIsVisible() { + return this.$store.getters.windowIsVisible + }, conversations() { return this.$store.getters.conversations }, @@ -240,7 +242,7 @@ export default { }, changeWindowVisibility() { - this.windowIsVisible = !document.hidden + this.$store.dispatch('setWindowVisibility', !document.hidden) if (this.windowIsVisible) { // Remove the potential "*" marker for unread chat messages this.setPageTitle(this.getConversationName(this.token), false) |