Bugfix: load of subscriptions at startup (#1216)
This commit is contained in:
parent
0a8854f3e5
commit
52e600dc13
|
@ -41,6 +41,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
dataReady: false,
|
||||||
hideOutlines: true,
|
hideOutlines: true,
|
||||||
showUpdatesBanner: false,
|
showUpdatesBanner: false,
|
||||||
showBlogBanner: false,
|
showBlogBanner: false,
|
||||||
|
@ -85,14 +86,17 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
this.$store.dispatch('grabUserSettings').then((result) => {
|
const v = this
|
||||||
|
this.$store.dispatch('grabUserSettings').then(() => {
|
||||||
|
this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels')).then(() => {
|
||||||
this.$store.dispatch('grabHistory')
|
this.$store.dispatch('grabHistory')
|
||||||
this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels'))
|
|
||||||
this.$store.dispatch('grabAllPlaylists')
|
this.$store.dispatch('grabAllPlaylists')
|
||||||
this.$store.commit('setUsingElectron', useElectron)
|
this.$store.commit('setUsingElectron', useElectron)
|
||||||
this.checkThemeSettings()
|
this.checkThemeSettings()
|
||||||
this.checkLocale()
|
this.checkLocale()
|
||||||
|
|
||||||
|
v.dataReady = true
|
||||||
|
|
||||||
if (useElectron) {
|
if (useElectron) {
|
||||||
console.log('User is using Electron')
|
console.log('User is using Electron')
|
||||||
this.activateKeyboardShortcuts()
|
this.activateKeyboardShortcuts()
|
||||||
|
@ -106,6 +110,7 @@ export default Vue.extend({
|
||||||
this.checkForNewBlogPosts()
|
this.checkForNewBlogPosts()
|
||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkLocale: function () {
|
checkLocale: function () {
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
/>
|
/>
|
||||||
</ft-flex-box>
|
</ft-flex-box>
|
||||||
<transition
|
<transition
|
||||||
|
v-if="dataReady"
|
||||||
mode="out-in"
|
mode="out-in"
|
||||||
name="fade"
|
name="fade"
|
||||||
>
|
>
|
||||||
|
|
|
@ -47,6 +47,7 @@ const getters = {
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
grabAllProfiles ({ rootState, dispatch, commit }, defaultName = null) {
|
grabAllProfiles ({ rootState, dispatch, commit }, defaultName = null) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
profileDb.find({}, (err, results) => {
|
profileDb.find({}, (err, results) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if (results.length === 0) {
|
if (results.length === 0) {
|
||||||
|
@ -72,14 +73,19 @@ const actions = {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (profileIndex !== -1) {
|
if (profileIndex !== -1) {
|
||||||
dispatch('updateActiveProfile', profileIndex)
|
commit('setActiveProfile', profileIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
commit('setProfileList', profiles)
|
commit('setProfileList', profiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resolve()
|
||||||
|
} else {
|
||||||
|
reject(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
grabProfileInfo (_, profileId) {
|
grabProfileInfo (_, profileId) {
|
||||||
|
|
Loading…
Reference in New Issue