equal
deleted
inserted
replaced
203 private suspend fun addAccount(): Account? { |
203 private suspend fun addAccount(): Account? { |
204 return withContext(dispatchers.io) { |
204 return withContext(dispatchers.io) { |
205 val account = Account(username, httpUrl!!.toString()) |
205 val account = Account(username, httpUrl!!.toString()) |
206 val success = accountManager.addAccount(account, password) |
206 val success = accountManager.addAccount(account, password) |
207 if (success) { |
207 if (success) { |
|
208 val serverInformation = DataServerInformation(account.url, http_auth_username, http_auth_password) |
|
209 accountManager.updateServerInformation(account, serverInformation) |
208 accountManager.initializeAccountSync(account) |
210 accountManager.initializeAccountSync(account) |
209 return@withContext account |
211 return@withContext account |
210 } |
212 } |
211 return@withContext null |
213 return@withContext null |
212 } |
214 } |