mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Add flag for automatic back pagination feature (#6637)
This commit is contained in:
committed by
GitHub
parent
75db550ca8
commit
1e04a7345f
+8
@@ -161,4 +161,12 @@ enum class FeatureFlags(
|
|||||||
defaultValue = { false },
|
defaultValue = { false },
|
||||||
isFinished = false,
|
isFinished = false,
|
||||||
),
|
),
|
||||||
|
AutomaticBackPagination(
|
||||||
|
key = "feature.automatic_back_pagination",
|
||||||
|
title = "Automatic back pagination of rooms",
|
||||||
|
description = "Allow the app to automatically back paginate in rooms to pre-fetch older messages in background." +
|
||||||
|
"\nRequires an app restart to take effect.",
|
||||||
|
defaultValue = { false },
|
||||||
|
isFinished = false,
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -105,6 +105,11 @@ class RustMatrixClientFactory(
|
|||||||
suspend fun create(client: Client): RustMatrixClient {
|
suspend fun create(client: Client): RustMatrixClient {
|
||||||
val (anonymizedAccessToken, anonymizedRefreshToken) = client.session().anonymizedTokens()
|
val (anonymizedAccessToken, anonymizedRefreshToken) = client.session().anonymizedTokens()
|
||||||
|
|
||||||
|
// Must be called before creating the sync service, timelines etc.
|
||||||
|
if (featureFlagService.isFeatureEnabled(FeatureFlags.AutomaticBackPagination)) {
|
||||||
|
client.enableAutomaticBackpagination()
|
||||||
|
}
|
||||||
|
|
||||||
client.setUtdDelegate(UtdTracker(analyticsService))
|
client.setUtdDelegate(UtdTracker(analyticsService))
|
||||||
|
|
||||||
val syncService = client.syncService()
|
val syncService = client.syncService()
|
||||||
|
|||||||
Reference in New Issue
Block a user