Fix custom server usage when signing in to family by mail

This commit is contained in:
Jonas Lochmann 2020-01-20 01:00:00 +01:00
parent 52dcde2f70
commit 2a43204ca6
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -1,5 +1,5 @@
/*
* TimeLimit Copyright <C> 2019 Jonas Lochmann
* TimeLimit Copyright <C> 2019 - 2020 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -173,8 +173,11 @@ class SetupParentModeModel(application: Application): AndroidViewModel(applicati
Threads.database.executeAndWait {
logic.database.transaction().use { transaction ->
val customServerUrl = logic.database.config().getCustomServerUrlSync()
database.deleteAllData()
database.config().setCustomServerUrlSync(customServerUrl)
database.config().setOwnDeviceIdSync(registerResponse.ownDeviceId)
database.config().setDeviceAuthTokenSync(registerResponse.deviceAuthToken)
database.config().setEnableBackgroundSync(enableBackgroundSync)