When restoring, set token from RestoreSet as new token
This commit is contained in:
parent
f6ea5c1db5
commit
425459fe79
1 changed files with 6 additions and 0 deletions
|
@ -166,6 +166,12 @@ internal class RestoreViewModel(
|
||||||
private suspend fun startRestore(token: Long) {
|
private suspend fun startRestore(token: Long) {
|
||||||
Log.d(TAG, "Starting new restore session to restore backup $token")
|
Log.d(TAG, "Starting new restore session to restore backup $token")
|
||||||
|
|
||||||
|
// if we had no token before (i.e. restore from setup wizard),
|
||||||
|
// use the token of the current restore set from now on
|
||||||
|
if (settingsManager.getToken() == null) {
|
||||||
|
settingsManager.setNewToken(token)
|
||||||
|
}
|
||||||
|
|
||||||
// we need to start a new session and retrieve the restore sets before starting the restore
|
// we need to start a new session and retrieve the restore sets before starting the restore
|
||||||
val restoreSetResult = getAvailableRestoreSets()
|
val restoreSetResult = getAvailableRestoreSets()
|
||||||
if (restoreSetResult.hasError()) {
|
if (restoreSetResult.hasError()) {
|
||||||
|
|
Loading…
Reference in a new issue