File tree Expand file tree Collapse file tree 5 files changed +6
-3
lines changed
api/src/main/kotlin/io/element/android/libraries/matrix/api/sync
main/kotlin/io/element/android/libraries/matrix/impl
test/kotlin/io/element/android/libraries/matrix/impl/sync Expand file tree Collapse file tree 5 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ enum class SyncState {
1212 Running ,
1313 Error ,
1414 Terminated ,
15+ Offline ,
1516}
Original file line number Diff line number Diff line change @@ -112,9 +112,9 @@ class RustMatrixClientFactory @Inject constructor(
112112 .useEventCachePersistentStorage(featureFlagService.isFeatureEnabled(FeatureFlags .EventCache ))
113113 .roomKeyRecipientStrategy(
114114 strategy = if (featureFlagService.isFeatureEnabled(FeatureFlags .OnlySignedDeviceIsolationMode )) {
115- CollectStrategy .IdentityBasedStrategy
115+ CollectStrategy .IDENTITY_BASED_STRATEGY
116116 } else {
117- CollectStrategy .DeviceBasedStrategy (onlyAllowTrustedDevices = false , errorOnVerifiedUserProblem = true )
117+ CollectStrategy .ERROR_ON_VERIFIED_USER_PROBLEM
118118 }
119119 )
120120 .roomDecryptionTrustRequirement(
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ internal fun SyncServiceState.toSyncState(): SyncState {
1616 SyncServiceState .RUNNING -> SyncState .Running
1717 SyncServiceState .TERMINATED -> SyncState .Terminated
1818 SyncServiceState .ERROR -> SyncState .Error
19+ SyncServiceState .OFFLINE -> SyncState .Offline
1920 }
2021}
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ class RustTimeline(
179179 updatePaginationStatus(direction) { it.copy(isPaginating = true ) }
180180 when (direction) {
181181 Timeline .PaginationDirection .BACKWARDS -> inner.paginateBackwards(PAGINATION_SIZE .toUShort())
182- Timeline .PaginationDirection .FORWARDS -> inner.focusedPaginateForwards (PAGINATION_SIZE .toUShort())
182+ Timeline .PaginationDirection .FORWARDS -> inner.paginateForwards (PAGINATION_SIZE .toUShort())
183183 }
184184 }.onFailure { error ->
185185 if (error is TimelineException .CannotPaginate ) {
Original file line number Diff line number Diff line change @@ -19,5 +19,6 @@ class AppStateMapperKtTest {
1919 assertThat(SyncServiceState .RUNNING .toSyncState()).isEqualTo(SyncState .Running )
2020 assertThat(SyncServiceState .TERMINATED .toSyncState()).isEqualTo(SyncState .Terminated )
2121 assertThat(SyncServiceState .ERROR .toSyncState()).isEqualTo(SyncState .Error )
22+ assertThat(SyncServiceState .OFFLINE .toSyncState()).isEqualTo(SyncState .Offline )
2223 }
2324}
You can’t perform that action at this time.
0 commit comments