mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Merge pull request #967 from vector-im/feature/bma/detektConfig
Update detekt config.
This commit is contained in:
+5
-4
@@ -95,9 +95,9 @@ object PermalinkParser {
|
||||
return if (signUrl.isNullOrEmpty().not() && email.isNullOrEmpty().not()) {
|
||||
try {
|
||||
val signValidUri = Uri.parse(signUrl)
|
||||
val identityServerHost = signValidUri.authority ?: throw IllegalArgumentException()
|
||||
val token = signValidUri.getQueryParameter("token") ?: throw IllegalArgumentException()
|
||||
val privateKey = signValidUri.getQueryParameter("private_key") ?: throw IllegalArgumentException()
|
||||
val identityServerHost = signValidUri.authority ?: throw IllegalArgumentException("missing `authority`")
|
||||
val token = signValidUri.getQueryParameter("token") ?: throw IllegalArgumentException("missing `token`")
|
||||
val privateKey = signValidUri.getQueryParameter("private_key") ?: throw IllegalArgumentException("missing `private_key`")
|
||||
PermalinkData.RoomEmailInviteLink(
|
||||
roomId = identifier,
|
||||
email = email!!,
|
||||
@@ -137,7 +137,8 @@ object PermalinkParser {
|
||||
.parameterList
|
||||
.filter {
|
||||
it.mParameter == "via"
|
||||
}.map {
|
||||
}
|
||||
.map {
|
||||
URLDecoder.decode(it.mValue, "UTF-8")
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -147,7 +147,8 @@ class RustMatrixClient constructor(
|
||||
if (syncState == SyncState.Running) {
|
||||
onSlidingSyncUpdate()
|
||||
}
|
||||
}.launchIn(sessionCoroutineScope)
|
||||
}
|
||||
.launchIn(sessionCoroutineScope)
|
||||
}
|
||||
|
||||
override suspend fun getRoom(roomId: RoomId): MatrixRoom? = withContext(sessionDispatcher) {
|
||||
@@ -227,7 +228,8 @@ class RustMatrixClient constructor(
|
||||
roomSummaryDataSource.allRooms()
|
||||
.filter { roomSummaries ->
|
||||
roomSummaries.map { it.identifier() }.contains(roomId.value)
|
||||
}.first()
|
||||
}
|
||||
.first()
|
||||
}
|
||||
roomId
|
||||
}
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
||||
client.restoreSession(sessionData.toSession())
|
||||
createMatrixClient(client)
|
||||
} else {
|
||||
throw IllegalStateException("No session to restore with id $sessionId")
|
||||
error("No session to restore with id $sessionId")
|
||||
}
|
||||
}.mapFailure { failure ->
|
||||
failure.mapClientException()
|
||||
|
||||
+2
-1
@@ -64,7 +64,8 @@ internal class RustRoomSummaryDataSource(
|
||||
.map { it.toRoomSummaryDataSourceLoadingState() }
|
||||
.onEach {
|
||||
allRoomsLoadingState.value = it
|
||||
}.launchIn(this)
|
||||
}
|
||||
.launchIn(this)
|
||||
|
||||
launch {
|
||||
// Wait until running, as invites is only available after that
|
||||
|
||||
+2
-1
@@ -118,7 +118,8 @@ class RustMatrixTimeline(
|
||||
innerRoom.backPaginationStatusFlow()
|
||||
.onEach {
|
||||
postPaginationStatus(it)
|
||||
}.launchIn(this)
|
||||
}
|
||||
.launchIn(this)
|
||||
|
||||
taskHandleBag += fetchMembers().getOrNull()
|
||||
}.invokeOnCompletion {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import java.util.Date
|
||||
|
||||
class TimelineEncryptedHistoryPostProcessorTest {
|
||||
|
||||
private val defaultLastLoginTimestamp = Date(1689061264L)
|
||||
private val defaultLastLoginTimestamp = Date(1_689_061_264L)
|
||||
|
||||
@Test
|
||||
fun `given an unencrypted room, nothing is done`() {
|
||||
|
||||
Reference in New Issue
Block a user