mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-26 17:43:11 +01:00
Update naming to InitialSyncProgressing for clarity.
This commit is contained in:
parent
3ae4303ecd
commit
363afd0089
@ -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 New Issue
Block a user