fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25 (#4273)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25 * Adapt to SDK changes: - Remove logic related to sliding sync proxy, leaving just the minimum needed to detect its usage on the current session data. - Remove code associated with the opt-in migration to native sliding sync, since it's now mandatory. - Remove toggle between proxy/native sliding sync. - Some fixes to session verification API breaks. * Update forced logout dialog message, remove `NativeSlidingSyncMigrationBanner` * Update screenshots * Update all strings * Remove `SuccessfulLogoutPendingAction` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io> Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
@@ -20,9 +20,6 @@ interface AppPreferencesStore {
|
||||
suspend fun setTheme(theme: String)
|
||||
fun getThemeFlow(): Flow<String?>
|
||||
|
||||
suspend fun setSimplifiedSlidingSyncEnabled(enabled: Boolean)
|
||||
fun isSimplifiedSlidingSyncEnabledFlow(): Flow<Boolean>
|
||||
|
||||
suspend fun setHideImagesAndVideos(value: Boolean)
|
||||
fun doesHideImagesAndVideosFlow(): Flow<Boolean>
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.preferences.api.store
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
||||
class EnableNativeSlidingSyncUseCase @Inject constructor(
|
||||
private val appPreferencesStore: AppPreferencesStore,
|
||||
private val appCoroutineScope: CoroutineScope,
|
||||
) {
|
||||
operator fun invoke() {
|
||||
appCoroutineScope.launch {
|
||||
appPreferencesStore.setSimplifiedSlidingSyncEnabled(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.preferences.api.store
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.libraries.preferences.test.InMemoryAppPreferencesStore
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.test.advanceUntilIdle
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Test
|
||||
|
||||
class EnableNativeSlidingSyncUseCaseTest {
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@Test
|
||||
fun `ensure that the use case sets the simplified sliding sync enabled flag`() = runTest {
|
||||
val preferencesStore = InMemoryAppPreferencesStore()
|
||||
val useCase = EnableNativeSlidingSyncUseCase(preferencesStore, this)
|
||||
assertThat(preferencesStore.isSimplifiedSlidingSyncEnabledFlow().first()).isFalse()
|
||||
|
||||
useCase()
|
||||
advanceUntilIdle()
|
||||
|
||||
assertThat(preferencesStore.isSimplifiedSlidingSyncEnabledFlow().first()).isTrue()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user