code cleanup

This commit is contained in:
Nolan Lawson 2018-01-22 22:00:17 -08:00
parent 9c287c0727
commit fb2f16f34a
1 changed files with 2 additions and 3 deletions

View File

@ -119,14 +119,13 @@
let instanceThemes = this.store.get('instanceThemes')
let instanceData = loggedInInstances[instanceName]
let verifyCredentials = await database.getInstanceVerifyCredentials(instanceName)
if (verifyCredentials) { // update
if (verifyCredentials) { // update in background
getVerifyCredentials(instanceName, instanceData.access_token).then(verifyCredentials => {
database.setInstanceVerifyCredentials(instanceName, verifyCredentials)
})
} else {
} else { // go to network
verifyCredentials = await getVerifyCredentials(instanceName, instanceData.access_token)
database.setInstanceVerifyCredentials(instanceName, verifyCredentials)
verifyCredentials = verifyCredentials
}
this.set({
verifyCredentials: verifyCredentials,