-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create SyncOrchestrator
#4176
base: develop
Are you sure you want to change the base?
Create SyncOrchestrator
#4176
Changes from 1 commit
35aeec4
19ab314
705521f
2f26b78
fc868a8
801dd62
b61677a
a86b267
3033b67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2025 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.appnav.di | ||
|
||
import com.squareup.anvil.annotations.ContributesBinding | ||
import io.element.android.libraries.di.AppScope | ||
import io.element.android.libraries.di.SingleIn | ||
import io.element.android.libraries.matrix.api.core.SessionId | ||
import io.element.android.libraries.matrix.api.sync.SyncOrchestrator | ||
import io.element.android.libraries.matrix.api.sync.SyncOrchestratorProvider | ||
import javax.inject.Inject | ||
|
||
@SingleIn(AppScope::class) | ||
@ContributesBinding(AppScope::class) | ||
class DefaultSyncOrchestratorProvider @Inject constructor( | ||
private val matrixClientsHolder: MatrixClientsHolder, | ||
Check warning on line 21 in appnav/src/main/kotlin/io/element/android/appnav/di/DefaultSyncOrchestratorProvider.kt Codecov / codecov/patchappnav/src/main/kotlin/io/element/android/appnav/di/DefaultSyncOrchestratorProvider.kt#L20-L21
|
||
) : SyncOrchestratorProvider { | ||
override fun get(sessionId: SessionId): SyncOrchestrator? { | ||
return matrixClientsHolder.getSyncOrchestratorOrNull(sessionId) | ||
Check warning on line 24 in appnav/src/main/kotlin/io/element/android/appnav/di/DefaultSyncOrchestratorProvider.kt Codecov / codecov/patchappnav/src/main/kotlin/io/element/android/appnav/di/DefaultSyncOrchestratorProvider.kt#L24
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should rename this class so it's a bit clearer it's not just about
MatrixClients
?Also we might want to create a class instead of using Pair?
I don't think we need the
DefaultSyncOrchestratorProvider
, we should letMatrixClientsHolder
(with a new name :P) implements theSyncOrchestratorProvider