Update plugin ktlint to v12.1.0 (#2200)

* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
renovate[bot] 2024-01-10 16:22:24 +01:00 committed by GitHub
parent 675cc525cf
commit 7e9cda3aa9
442 changed files with 1091 additions and 1081 deletions

View file

@ -32,7 +32,7 @@ class UnifiedPushGatewayResolver @Inject constructor(
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}"
val customBase = "${url.protocol}://${url.host}$port"
val customUrl = "$customBase/_matrix/push/v1/notify"
Timber.i("Testing $customUrl")
try {

View file

@ -24,14 +24,14 @@ import javax.inject.Inject
class UnregisterUnifiedPushUseCase @Inject constructor(
@ApplicationContext private val context: Context,
//private val pushDataStore: PushDataStore,
// private val pushDataStore: PushDataStore,
private val unifiedPushStore: UnifiedPushStore,
// private val unifiedPushGatewayResolver: UnifiedPushGatewayResolver,
) {
suspend fun execute(clientSecret: String /*pushersManager: PushersManager?*/) {
//val mode = BackgroundSyncMode.FDROID_BACKGROUND_SYNC_MODE_FOR_REALTIME
//pushDataStore.setFdroidSyncBackgroundMode(mode)
// val mode = BackgroundSyncMode.FDROID_BACKGROUND_SYNC_MODE_FOR_REALTIME
// pushDataStore.setFdroidSyncBackgroundMode(mode)
try {
unifiedPushStore.getEndpoint(clientSecret)?.let {
Timber.d("Removing $it")