Change signature of RustMatrixClient, val are not always necessary.
This commit is contained in:
committed by
Benoit Marty
parent
e3a58974dd
commit
7db53c52ea
@@ -116,14 +116,14 @@ import org.matrix.rustcomponents.sdk.SyncService as ClientSyncService
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class RustMatrixClient(
|
||||
private val client: Client,
|
||||
private val syncService: ClientSyncService,
|
||||
private val baseDirectory: File,
|
||||
private val sessionStore: SessionStore,
|
||||
private val appCoroutineScope: CoroutineScope,
|
||||
private val dispatchers: CoroutineDispatchers,
|
||||
private val baseDirectory: File,
|
||||
baseCacheDirectory: File,
|
||||
private val clock: SystemClock,
|
||||
private val sessionDelegate: RustClientSessionDelegate,
|
||||
syncService: ClientSyncService,
|
||||
dispatchers: CoroutineDispatchers,
|
||||
baseCacheDirectory: File,
|
||||
clock: SystemClock,
|
||||
timelineEventTypeFilterFactory: TimelineEventTypeFilterFactory,
|
||||
) : MatrixClient {
|
||||
override val sessionId: UserId = UserId(client.userId())
|
||||
|
||||
@@ -70,14 +70,14 @@ class RustMatrixClientFactory @Inject constructor(
|
||||
|
||||
RustMatrixClient(
|
||||
client = client,
|
||||
syncService = syncService,
|
||||
baseDirectory = baseDirectory,
|
||||
sessionStore = sessionStore,
|
||||
appCoroutineScope = appCoroutineScope,
|
||||
sessionDelegate = sessionDelegate,
|
||||
syncService = syncService,
|
||||
dispatchers = coroutineDispatchers,
|
||||
baseDirectory = baseDirectory,
|
||||
baseCacheDirectory = cacheDirectory,
|
||||
clock = clock,
|
||||
sessionDelegate = sessionDelegate,
|
||||
timelineEventTypeFilterFactory = timelineEventTypeFilterFactory,
|
||||
).also {
|
||||
Timber.tag(it.toString()).d("Creating Client with access token '$anonymizedAccessToken' and refresh token '$anonymizedRefreshToken'")
|
||||
|
||||
@@ -26,18 +26,18 @@ class RustMatrixClientTest {
|
||||
val sessionStore = InMemorySessionStore()
|
||||
val sut = RustMatrixClient(
|
||||
client = FakeRustClient(),
|
||||
syncService = FakeRustSyncService(),
|
||||
baseDirectory = File(""),
|
||||
sessionStore = InMemorySessionStore(),
|
||||
appCoroutineScope = this,
|
||||
dispatchers = testCoroutineDispatchers(),
|
||||
baseDirectory = File(""),
|
||||
baseCacheDirectory = File(""),
|
||||
clock = FakeSystemClock(),
|
||||
sessionDelegate = RustClientSessionDelegate(
|
||||
sessionStore = sessionStore,
|
||||
appCoroutineScope = this,
|
||||
coroutineDispatchers = testCoroutineDispatchers(),
|
||||
),
|
||||
syncService = FakeRustSyncService(),
|
||||
dispatchers = testCoroutineDispatchers(),
|
||||
baseCacheDirectory = File(""),
|
||||
clock = FakeSystemClock(),
|
||||
timelineEventTypeFilterFactory = FakeTimelineEventTypeFilterFactory(),
|
||||
)
|
||||
assertThat(sut.sessionId).isEqualTo(A_USER_ID)
|
||||
|
||||
Reference in New Issue
Block a user