ensure we sync settings whilst tab is open

This commit is contained in:
FloatingGhost 2022-10-08 11:55:48 +01:00
parent 80f58baa86
commit 7df49720de
4 changed files with 8872 additions and 9296 deletions

View file

@ -211,7 +211,17 @@ const api = {
...rest
})
},
startFetchingConfig (store) {
if (store.state.fetchers.config) return
const fetcher = store.state.backendInteractor.startFetchingConfig({ store })
store.commit('addFetcher', { fetcherName: 'config', fetcher })
},
stopFetchingConfig (store) {
const fetcher = store.state.fetchers.config
if (!fetcher) return
store.commit('removeFetcher', { fetcherName: 'config', fetcher })
},
// Notifications
startFetchingNotifications (store) {
if (store.state.fetchers.notifications) return