Change signature of RustMatrixClient, val are not always necessary.
This commit is contained in:
parent
e3a58974dd
commit
7db53c52ea
3 changed files with 13 additions and 13 deletions
|
|
@ -116,14 +116,14 @@ import org.matrix.rustcomponents.sdk.SyncService as ClientSyncService
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
class RustMatrixClient(
|
class RustMatrixClient(
|
||||||
private val client: Client,
|
private val client: Client,
|
||||||
private val syncService: ClientSyncService,
|
private val baseDirectory: File,
|
||||||
private val sessionStore: SessionStore,
|
private val sessionStore: SessionStore,
|
||||||
private val appCoroutineScope: CoroutineScope,
|
private val appCoroutineScope: CoroutineScope,
|
||||||
private val dispatchers: CoroutineDispatchers,
|
|
||||||
private val baseDirectory: File,
|
|
||||||
baseCacheDirectory: File,
|
|
||||||
private val clock: SystemClock,
|
|
||||||
private val sessionDelegate: RustClientSessionDelegate,
|
private val sessionDelegate: RustClientSessionDelegate,
|
||||||
|
syncService: ClientSyncService,
|
||||||
|
dispatchers: CoroutineDispatchers,
|
||||||
|
baseCacheDirectory: File,
|
||||||
|
clock: SystemClock,
|
||||||
timelineEventTypeFilterFactory: TimelineEventTypeFilterFactory,
|
timelineEventTypeFilterFactory: TimelineEventTypeFilterFactory,
|
||||||
) : MatrixClient {
|
) : MatrixClient {
|
||||||
override val sessionId: UserId = UserId(client.userId())
|
override val sessionId: UserId = UserId(client.userId())
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,14 @@ class RustMatrixClientFactory @Inject constructor(
|
||||||
|
|
||||||
RustMatrixClient(
|
RustMatrixClient(
|
||||||
client = client,
|
client = client,
|
||||||
syncService = syncService,
|
baseDirectory = baseDirectory,
|
||||||
sessionStore = sessionStore,
|
sessionStore = sessionStore,
|
||||||
appCoroutineScope = appCoroutineScope,
|
appCoroutineScope = appCoroutineScope,
|
||||||
|
sessionDelegate = sessionDelegate,
|
||||||
|
syncService = syncService,
|
||||||
dispatchers = coroutineDispatchers,
|
dispatchers = coroutineDispatchers,
|
||||||
baseDirectory = baseDirectory,
|
|
||||||
baseCacheDirectory = cacheDirectory,
|
baseCacheDirectory = cacheDirectory,
|
||||||
clock = clock,
|
clock = clock,
|
||||||
sessionDelegate = sessionDelegate,
|
|
||||||
timelineEventTypeFilterFactory = timelineEventTypeFilterFactory,
|
timelineEventTypeFilterFactory = timelineEventTypeFilterFactory,
|
||||||
).also {
|
).also {
|
||||||
Timber.tag(it.toString()).d("Creating Client with access token '$anonymizedAccessToken' and refresh token '$anonymizedRefreshToken'")
|
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 sessionStore = InMemorySessionStore()
|
||||||
val sut = RustMatrixClient(
|
val sut = RustMatrixClient(
|
||||||
client = FakeRustClient(),
|
client = FakeRustClient(),
|
||||||
syncService = FakeRustSyncService(),
|
baseDirectory = File(""),
|
||||||
sessionStore = InMemorySessionStore(),
|
sessionStore = InMemorySessionStore(),
|
||||||
appCoroutineScope = this,
|
appCoroutineScope = this,
|
||||||
dispatchers = testCoroutineDispatchers(),
|
|
||||||
baseDirectory = File(""),
|
|
||||||
baseCacheDirectory = File(""),
|
|
||||||
clock = FakeSystemClock(),
|
|
||||||
sessionDelegate = RustClientSessionDelegate(
|
sessionDelegate = RustClientSessionDelegate(
|
||||||
sessionStore = sessionStore,
|
sessionStore = sessionStore,
|
||||||
appCoroutineScope = this,
|
appCoroutineScope = this,
|
||||||
coroutineDispatchers = testCoroutineDispatchers(),
|
coroutineDispatchers = testCoroutineDispatchers(),
|
||||||
),
|
),
|
||||||
|
syncService = FakeRustSyncService(),
|
||||||
|
dispatchers = testCoroutineDispatchers(),
|
||||||
|
baseCacheDirectory = File(""),
|
||||||
|
clock = FakeSystemClock(),
|
||||||
timelineEventTypeFilterFactory = FakeTimelineEventTypeFilterFactory(),
|
timelineEventTypeFilterFactory = FakeTimelineEventTypeFilterFactory(),
|
||||||
)
|
)
|
||||||
assertThat(sut.sessionId).isEqualTo(A_USER_ID)
|
assertThat(sut.sessionId).isEqualTo(A_USER_ID)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue