mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add global search backfill worker (#7860)
* Add search backfill worker This will run on background at most once an hour while the device has internet connectivity and the device is charging and start back-paginating through the user's rooms to make sure the search results are populated. It'll run for the maximum time the default workers allow, 10 minutes. * Create `RustMatrixClient.Factory` AssistedFactory to help with DI and add `SearchBackfillService` * Start search backfill when entering the search screen, just once. This should help getting initial search results if none or few are found at first
This commit is contained in:
committed by
GitHub
parent
9805422a8a
commit
3fe0e09e3c
+2
@@ -43,6 +43,7 @@ fun workManagerTag(sessionId: SessionId, requestType: WorkManagerRequestType): S
|
||||
val prefix = when (requestType) {
|
||||
WorkManagerRequestType.NOTIFICATION_SYNC -> "notifications"
|
||||
WorkManagerRequestType.DB_VACUUM -> "db_vacuum"
|
||||
WorkManagerRequestType.SEARCH_BACKFILL -> "search_backfill"
|
||||
}
|
||||
return "$prefix-$sessionId"
|
||||
}
|
||||
@@ -50,4 +51,5 @@ fun workManagerTag(sessionId: SessionId, requestType: WorkManagerRequestType): S
|
||||
enum class WorkManagerRequestType {
|
||||
NOTIFICATION_SYNC,
|
||||
DB_VACUUM,
|
||||
SEARCH_BACKFILL,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user