Merge pull request #1114 from GilgusMaximus/defaultProfile
Profile loading inconsistency
This commit is contained in:
commit
726b521e38
|
@ -85,7 +85,7 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.$store.dispatch('grabUserSettings')
|
||||
this.$store.dispatch('grabUserSettings').then((result) => {
|
||||
this.$store.dispatch('grabHistory')
|
||||
this.$store.dispatch('grabAllProfiles', this.$t('Profile.All Channels'))
|
||||
this.$store.dispatch('grabAllPlaylists')
|
||||
|
@ -105,6 +105,7 @@ export default Vue.extend({
|
|||
this.checkForNewUpdates()
|
||||
this.checkForNewBlogPosts()
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkLocale: function () {
|
||||
|
|
|
@ -13,7 +13,6 @@ if (window && window.process && window.process.type === 'renderer') {
|
|||
|
||||
const remote = require('@electron/remote')
|
||||
dbLocation = remote.app.getPath('userData')
|
||||
|
||||
dbLocation = dbLocation + '/history.db'
|
||||
} else {
|
||||
dbLocation = 'history.db'
|
||||
|
|
|
@ -103,7 +103,7 @@ const actions = {
|
|||
textColor: textColor,
|
||||
subscriptions: []
|
||||
}
|
||||
console.log(defaultProfile)
|
||||
|
||||
profileDb.update({ _id: 'allChannels' }, defaultProfile, { upsert: true }, (err, numReplaced) => {
|
||||
if (!err) {
|
||||
dispatch('grabAllProfiles')
|
||||
|
|
|
@ -264,6 +264,7 @@ const getters = {
|
|||
|
||||
const actions = {
|
||||
grabUserSettings ({ dispatch, commit, rootState }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
settingsDb.find({}, (err, results) => {
|
||||
if (!err) {
|
||||
console.log(results)
|
||||
|
@ -280,6 +281,7 @@ const actions = {
|
|||
commit('setBackendFallback', result.value)
|
||||
break
|
||||
case 'defaultProfile':
|
||||
console.log('IN SETTING DEFAULT:', result.value)
|
||||
commit('setDefaultProfile', result.value)
|
||||
break
|
||||
case 'checkForUpdates':
|
||||
|
@ -409,7 +411,10 @@ const actions = {
|
|||
break
|
||||
}
|
||||
})
|
||||
resolve()
|
||||
}
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue