mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Fix moar ktlint issues
This commit is contained in:
committed by
Benoit Marty
parent
5d086ad82d
commit
d01c70a4fd
+3
-3
@@ -21,8 +21,8 @@ object UnifiedPushConfig {
|
||||
* It is the push gateway for UnifiedPush.
|
||||
* Note: default_push_gateway_http_url should have path '/_matrix/push/v1/notify'
|
||||
*/
|
||||
const val default_push_gateway_http_url: String = "https://matrix.gateway.unifiedpush.org/_matrix/push/v1/notify"
|
||||
const val DEFAULT_PUSH_GATEWAY_HTTP_URL: String = "https://matrix.gateway.unifiedpush.org/_matrix/push/v1/notify"
|
||||
|
||||
const val index = 1
|
||||
const val name = "UnifiedPush"
|
||||
const val INDEX = 1
|
||||
const val NAME = "UnifiedPush"
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class UnifiedPushGatewayResolver @Inject constructor(
|
||||
private val coroutineDispatchers: CoroutineDispatchers,
|
||||
) {
|
||||
suspend fun getGateway(endpoint: String): String? {
|
||||
val gateway = UnifiedPushConfig.default_push_gateway_http_url
|
||||
val gateway = UnifiedPushConfig.DEFAULT_PUSH_GATEWAY_HTTP_URL
|
||||
val url = URL(endpoint)
|
||||
val port = if (url.port != -1) ":${url.port}" else ""
|
||||
val customBase = "${url.protocol}://${url.host}$port"
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ class UnifiedPushNewGatewayHandler @Inject constructor(
|
||||
Timber.w("Unable to retrieve session")
|
||||
}
|
||||
val userDataStore = userPushStoreFactory.create(userId)
|
||||
if (userDataStore.getPushProviderName() == UnifiedPushConfig.name) {
|
||||
if (userDataStore.getPushProviderName() == UnifiedPushConfig.NAME) {
|
||||
matrixAuthenticationService.restoreSession(userId).getOrNull()?.use { client ->
|
||||
pusherSubscriber.registerPusher(client, endpoint, pushGateway)
|
||||
}
|
||||
|
||||
+2
-2
@@ -35,8 +35,8 @@ class UnifiedPushProvider @Inject constructor(
|
||||
private val unRegisterUnifiedPushUseCase: UnregisterUnifiedPushUseCase,
|
||||
private val pushClientSecret: PushClientSecret,
|
||||
) : PushProvider {
|
||||
override val index = UnifiedPushConfig.index
|
||||
override val name = UnifiedPushConfig.name
|
||||
override val index = UnifiedPushConfig.INDEX
|
||||
override val name = UnifiedPushConfig.NAME
|
||||
|
||||
override fun getDistributors(): List<Distributor> {
|
||||
val distributors = UnifiedPush.getDistributors(context)
|
||||
|
||||
Reference in New Issue
Block a user