Fixed a small bug while removing accounts

This commit is contained in:
Scharel Clemens 2019-10-27 17:53:38 +01:00
parent 5156f1e629
commit 85b33a9e37

View file

@ -61,10 +61,6 @@ ApplicationWindow
}
function removeAccount(uuid) {
autoSyncTimer.stop()
var tmpAccouunt = currentAccount
currentAccount = uuid
api.clear()
currentAccount = tmpAccouunt
var newIds = [ ]
accountIDs.forEach(function(currentValue) {
if (currentValue !== uuid) {
@ -74,7 +70,7 @@ ApplicationWindow
accounts.value = newIds
for (var i = accountIDs.length-1; i >= 0; i--) {
if (accountIDs[i] !== uuid) {
api.uuid = accountIDs[i]
appSettings.currentAccount = uuid
break
}
}