Merge pull request #1305 from vector-im/feature/fix_delay_initial_sync

Fix / ensure ux aware of wait
This commit is contained in:
Benoit Marty 2020-04-29 17:12:58 +02:00 committed by GitHub
commit 071a43c8d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,6 @@ internal class DefaultSyncTask @Inject constructor(
private suspend fun doSync(params: SyncTask.Params) {
Timber.v("Sync task started on Thread: ${Thread.currentThread().name}")
// Maybe refresh the home server capabilities data we know
getHomeServerCapabilitiesTask.execute(Unit)
val requestParams = HashMap<String, String>()
var timeout = 0L
@ -73,6 +71,9 @@ internal class DefaultSyncTask @Inject constructor(
initialSyncProgressService.endAll()
initialSyncProgressService.startTask(R.string.initial_sync_start_importing_account, 100)
}
// Maybe refresh the home server capabilities data we know
getHomeServerCapabilitiesTask.execute(Unit)
val syncResponse = executeRequest<SyncResponse>(eventBus) {
apiCall = syncAPI.sync(requestParams)
}