Fix moar ktlint issues

This commit is contained in:
Benoit Marty 2024-01-11 09:41:14 +01:00 committed by Benoit Marty
parent 378692f743
commit 72a363c244
27 changed files with 69 additions and 53 deletions

View file

@ -17,5 +17,5 @@
package io.element.android.libraries.matrix.api.auth
object OidcConfig {
const val redirectUri = "io.element:/callback"
const val REDIRECT_URI = "io.element:/callback"
}

View file

@ -21,7 +21,7 @@ import org.matrix.rustcomponents.sdk.OidcConfiguration
val oidcConfiguration: OidcConfiguration = OidcConfiguration(
clientName = "Element",
redirectUri = OidcConfig.redirectUri,
redirectUri = OidcConfig.REDIRECT_URI,
clientUri = "https://element.io",
logoUri = "https://element.io/mobile-icon.png",
tosUri = "https://element.io/acceptable-use-policy-terms",
@ -29,9 +29,7 @@ val oidcConfiguration: OidcConfiguration = OidcConfiguration(
contacts = listOf(
"support@element.io",
),
/**
* Some homeservers/auth issuers don't support dynamic client registration, and have to be registered manually
*/
// Some homeservers/auth issuers don't support dynamic client registration, and have to be registered manually
staticRegistrations = mapOf(
"https://id.thirdroom.io/realms/thirdroom" to "elementx",
),

View file

@ -84,7 +84,7 @@ class FakeEncryptionService : EncryptionService {
}
override suspend fun resetRecoveryKey(): Result<String> = simulateLongTask {
return Result.success(fakeRecoveryKey)
return Result.success(FAKE_RECOVERY_KEY)
}
override suspend fun enableRecovery(waitForBackupsToUpload: Boolean): Result<Unit> = simulateLongTask {
@ -108,6 +108,6 @@ class FakeEncryptionService : EncryptionService {
}
companion object {
const val fakeRecoveryKey = "fake"
const val FAKE_RECOVERY_KEY = "fake"
}
}

View file

@ -33,7 +33,7 @@ class FakeNotificationSettingsService(
initialOneToOneDefaultMode: RoomNotificationMode = RoomNotificationMode.ALL_MESSAGES,
initialEncryptedOneToOneDefaultMode: RoomNotificationMode = RoomNotificationMode.ALL_MESSAGES,
) : NotificationSettingsService {
private var _notificationSettingsStateFlow = MutableStateFlow(Unit)
private val notificationSettingsStateFlow = MutableStateFlow(Unit)
private var defaultGroupRoomNotificationMode: RoomNotificationMode = initialGroupDefaultMode
private var defaultEncryptedGroupRoomNotificationMode: RoomNotificationMode = initialEncryptedGroupDefaultMode
private var defaultOneToOneRoomNotificationMode: RoomNotificationMode = initialOneToOneDefaultMode
@ -49,7 +49,7 @@ class FakeNotificationSettingsService(
private var setAtRoomError: Throwable? = null
private var canHomeServerPushEncryptedEventsToDeviceResult = Result.success(true)
override val notificationSettingsChangeFlow: SharedFlow<Unit>
get() = _notificationSettingsStateFlow
get() = notificationSettingsStateFlow
override suspend fun getRoomNotificationSettings(roomId: RoomId, isEncrypted: Boolean, isOneToOne: Boolean): Result<RoomNotificationSettings> {
return Result.success(
@ -94,7 +94,7 @@ class FakeNotificationSettingsService(
defaultGroupRoomNotificationMode = mode
}
}
_notificationSettingsStateFlow.emit(Unit)
notificationSettingsStateFlow.emit(Unit)
return Result.success(Unit)
}
@ -105,7 +105,7 @@ class FakeNotificationSettingsService(
} else {
roomNotificationModeIsDefault = false
roomNotificationMode = mode
_notificationSettingsStateFlow.emit(Unit)
notificationSettingsStateFlow.emit(Unit)
Result.success(Unit)
}
}
@ -117,7 +117,7 @@ class FakeNotificationSettingsService(
}
roomNotificationModeIsDefault = true
roomNotificationMode = defaultEncryptedGroupRoomNotificationMode
_notificationSettingsStateFlow.emit(Unit)
notificationSettingsStateFlow.emit(Unit)
return Result.success(Unit)
}