mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Fix settings UI not updating.
This commit is contained in:
parent
5ea12d469b
commit
2a99d72dde
@ -387,6 +387,7 @@ ipcRenderer.on(MSFT_OPCODE.REPLY_LOGIN, (_, ...arguments_) => {
|
|||||||
AuthManager.addMicrosoftAccount(authCode).then(value => {
|
AuthManager.addMicrosoftAccount(authCode).then(value => {
|
||||||
updateSelectedAccount(value)
|
updateSelectedAccount(value)
|
||||||
switchView(getCurrentView(), VIEWS.settings, 500, 500, () => {
|
switchView(getCurrentView(), VIEWS.settings, 500, 500, () => {
|
||||||
|
prepareSettings()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -451,6 +452,7 @@ function bindAuthAccountLogOut(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let msAccDomElementCache
|
||||||
/**
|
/**
|
||||||
* Process a log out.
|
* Process a log out.
|
||||||
*
|
*
|
||||||
@ -463,6 +465,7 @@ function processLogOut(val, isLastAccount){
|
|||||||
const prevSelAcc = ConfigManager.getSelectedAccount()
|
const prevSelAcc = ConfigManager.getSelectedAccount()
|
||||||
const targetAcc = ConfigManager.getAuthAccount(uuid)
|
const targetAcc = ConfigManager.getAuthAccount(uuid)
|
||||||
if(targetAcc.type === 'microsoft') {
|
if(targetAcc.type === 'microsoft') {
|
||||||
|
msAccDomElementCache = parent
|
||||||
switchView(getCurrentView(), VIEWS.waiting, 500, 500, () => {
|
switchView(getCurrentView(), VIEWS.waiting, 500, 500, () => {
|
||||||
ipcRenderer.send(MSFT_OPCODE.OPEN_LOGOUT, uuid, isLastAccount)
|
ipcRenderer.send(MSFT_OPCODE.OPEN_LOGOUT, uuid, isLastAccount)
|
||||||
})
|
})
|
||||||
@ -520,6 +523,10 @@ ipcRenderer.on(MSFT_OPCODE.REPLY_LOGOUT, (_, ...arguments_) => {
|
|||||||
updateSelectedAccount(selAcc)
|
updateSelectedAccount(selAcc)
|
||||||
validateSelectedAccount()
|
validateSelectedAccount()
|
||||||
}
|
}
|
||||||
|
if(msAccDomElementCache) {
|
||||||
|
msAccDomElementCache.remove()
|
||||||
|
msAccDomElementCache = null
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
switchView(getCurrentView(), VIEWS.settings, 500, 500)
|
switchView(getCurrentView(), VIEWS.settings, 500, 500)
|
||||||
|
Loading…
Reference in New Issue
Block a user