mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Enable global search feature flag (#7890)
Enable the global search feature by default for all variants of the app
This commit is contained in:
committed by
GitHub
parent
5d498ee37b
commit
f12b9c77d5
+1
-1
@@ -151,7 +151,7 @@ enum class FeatureFlags(
|
||||
key = "feature.message_search",
|
||||
title = "Message search",
|
||||
description = "Index messages locally so they can be searched. Only messages received while enabled are indexed.",
|
||||
defaultValue = { false },
|
||||
defaultValue = { true },
|
||||
isFinished = false,
|
||||
),
|
||||
MessageMultiSelect(
|
||||
|
||||
+4
-3
@@ -44,14 +44,15 @@ import org.matrix.rustcomponents.sdk.SyncService as ClientSyncService
|
||||
class RustMatrixClientFactoryTest {
|
||||
@Test
|
||||
fun test() = runTest {
|
||||
val scheduleVacuumLambda = lambdaRecorder<WorkManagerRequestBuilder, Unit> {}
|
||||
val workManagerScheduler = FakeWorkManagerScheduler(submitLambda = scheduleVacuumLambda, cancelLambda = { _, _ -> })
|
||||
val scheduleWorkersLambda = lambdaRecorder<WorkManagerRequestBuilder, Unit> {}
|
||||
val workManagerScheduler = FakeWorkManagerScheduler(submitLambda = scheduleWorkersLambda, cancelLambda = { _, _ -> })
|
||||
val sut = createRustMatrixClientFactory(workManagerScheduler = workManagerScheduler)
|
||||
|
||||
val result = sut.create(aSessionData())
|
||||
|
||||
assertThat(result.sessionId).isEqualTo(SessionId("@alice:server.org"))
|
||||
scheduleVacuumLambda.assertions().isCalledOnce()
|
||||
// 2 workers are scheduled: one for the search backfill and one for the vacuum
|
||||
scheduleWorkersLambda.assertions().isCalledExactly(2)
|
||||
result.destroy()
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -50,5 +50,6 @@ class FakeFfiClientBuilder(
|
||||
override fun inMemoryStore(): ClientBuilder = this
|
||||
override fun crossProcessLockConfig(crossProcessLockConfig: CrossProcessLockConfig): ClientBuilder = this
|
||||
override fun dmRoomDefinition(dmRoomDefinition: DmRoomDefinition): ClientBuilder = this
|
||||
override fun withSearchIndexStore(path: String, password: String?): ClientBuilder = this
|
||||
override suspend fun build() = buildResult()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user