Make SyncState values match SyncServiceState values.
This commit is contained in:
@@ -164,7 +164,7 @@ class LoggedInFlowNode @AssistedInject constructor(
|
||||
syncService.syncState,
|
||||
networkMonitor.connectivity
|
||||
) { syncState, networkStatus ->
|
||||
syncState == SyncState.InError && networkStatus == NetworkStatus.Online
|
||||
syncState == SyncState.Error && networkStatus == NetworkStatus.Online
|
||||
}
|
||||
.distinctUntilChanged()
|
||||
.collect { restartSync ->
|
||||
|
||||
@@ -30,7 +30,7 @@ open class LoggedInStateProvider : PreviewParameterProvider<LoggedInState> {
|
||||
}
|
||||
|
||||
fun aLoggedInState(
|
||||
syncState: SyncState = SyncState.Syncing,
|
||||
syncState: SyncState = SyncState.Running,
|
||||
) = LoggedInState(
|
||||
syncState = syncState,
|
||||
permissionsState = createDummyPostNotificationPermissionsState(),
|
||||
|
||||
@@ -84,8 +84,8 @@ fun SyncStateView(
|
||||
|
||||
private fun SyncState.mustBeVisible() = when (this) {
|
||||
SyncState.Idle -> true
|
||||
SyncState.Syncing -> false
|
||||
SyncState.InError -> false /* In this case, the network error banner can be displayed */
|
||||
SyncState.Running -> false
|
||||
SyncState.Error -> false /* In this case, the network error banner can be displayed */
|
||||
SyncState.Terminated -> false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user