mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Update naming to InitialSyncProgressing for clarity.
This commit is contained in:
parent
3ae4303ecd
commit
363afd0089
6 changed files with 7 additions and 7 deletions
|
@ -1 +1 @@
|
|||
Include original event in live decryption listeners.
|
||||
Include original event in live decryption listeners and update sync status naming to InitialSyncProgressing for clarity.
|
|
@ -28,7 +28,7 @@ interface SyncStatusService {
|
|||
abstract class InitialSyncStatus : Status()
|
||||
|
||||
object Idle : InitialSyncStatus()
|
||||
data class Progressing(
|
||||
data class InitialSyncProgressing(
|
||||
val initSyncStep: InitSyncStep,
|
||||
val percentProgress: Int = 0
|
||||
) : InitialSyncStatus()
|
||||
|
|
|
@ -72,7 +72,7 @@ internal class DefaultSyncStatusService @Inject constructor() :
|
|||
// Update the progress of the leaf and all its parents
|
||||
leaf.setProgress(progress)
|
||||
// Then update the live data using leaf wording and root progress
|
||||
status.postValue(SyncStatusService.Status.Progressing(leaf.initSyncStep, root.currentProgress.toInt()))
|
||||
status.postValue(SyncStatusService.Status.InitialSyncProgressing(leaf.initSyncStep, root.currentProgress.toInt()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ class AutoRageShaker @Inject constructor(
|
|||
session.getSyncStatusLive()
|
||||
.asFlow()
|
||||
.onEach {
|
||||
hasSynced = it !is SyncStatusService.Status.Progressing
|
||||
hasSynced = it !is SyncStatusService.Status.InitialSyncProgressing
|
||||
}
|
||||
.launchIn(session.coroutineScope)
|
||||
activeSessionIds.add(sessionId)
|
||||
|
|
|
@ -307,7 +307,7 @@ class HomeActivity :
|
|||
|
||||
private fun renderState(state: HomeActivityViewState) {
|
||||
when (val status = state.syncStatusServiceStatus) {
|
||||
is SyncStatusService.Status.Progressing -> {
|
||||
is SyncStatusService.Status.InitialSyncProgressing -> {
|
||||
val initSyncStepStr = initSyncStepFormatter.format(status.initSyncStep)
|
||||
Timber.v("$initSyncStepStr ${status.percentProgress}")
|
||||
views.waitingView.root.setOnClickListener {
|
||||
|
|
|
@ -137,11 +137,11 @@ class HomeActivityViewModel @AssistedInject constructor(
|
|||
.asFlow()
|
||||
.onEach { status ->
|
||||
when (status) {
|
||||
is SyncStatusService.Status.Progressing -> {
|
||||
is SyncStatusService.Status.InitialSyncProgressing -> {
|
||||
// Schedule a check of the bootstrap when the init sync will be finished
|
||||
checkBootstrap = true
|
||||
}
|
||||
is SyncStatusService.Status.Idle -> {
|
||||
is SyncStatusService.Status.Idle -> {
|
||||
if (checkBootstrap) {
|
||||
checkBootstrap = false
|
||||
maybeBootstrapCrossSigningAfterInitialSync()
|
||||
|
|
Loading…
Reference in a new issue