Skip to content

Commit 92b8be9

Browse files
committed
Remove MatrixAuthenticationService.getLatestSessionId()
1 parent 6f827bb commit 92b8be9

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/auth/MatrixAuthenticationService.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import io.element.android.libraries.matrix.api.core.SessionId
1616
import kotlinx.coroutines.flow.StateFlow
1717

1818
interface MatrixAuthenticationService {
19-
suspend fun getLatestSessionId(): SessionId?
20-
2119
/**
2220
* Restore a session from a [sessionId].
2321
* Do not restore anything it the access token is not valid anymore.

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/auth/RustMatrixAuthenticationService.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ class RustMatrixAuthenticationService(
8181
.also { sessionPaths = it }
8282
}
8383

84-
override suspend fun getLatestSessionId(): SessionId? = withContext(coroutineDispatchers.io) {
85-
sessionStore.getLatestSession()?.userId?.let { SessionId(it) }
86-
}
87-
8884
override suspend fun restoreSession(sessionId: SessionId): Result<MatrixClient> = withContext(coroutineDispatchers.io) {
8985
runCatchingExceptions {
9086
val sessionData = sessionStore.getSession(sessionId.value)

libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/auth/FakeMatrixAuthenticationService.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ class FakeMatrixAuthenticationService(
4141
private var matrixClient: MatrixClient? = null
4242
private var onAuthenticationListener: ((MatrixClient) -> Unit)? = null
4343

44-
var getLatestSessionIdLambda: (() -> SessionId?) = { null }
45-
46-
override suspend fun getLatestSessionId(): SessionId? = getLatestSessionIdLambda()
47-
4844
override suspend fun restoreSession(sessionId: SessionId): Result<MatrixClient> {
4945
matrixClientResult?.let {
5046
return it.invoke(sessionId)

0 commit comments

Comments
 (0)