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

@ -17,7 +17,6 @@
package io.element.android.libraries.pushstore.api
import kotlinx.coroutines.flow.Flow
/**
* Store data related to push about a user.
*/

View file

@ -63,7 +63,7 @@ class UserPushStoreDataStore(
}
override fun getNotificationEnabledForDevice(): Flow<Boolean> {
return context.dataStore.data.map{ it[notificationEnabled].orTrue() }
return context.dataStore.data.map { it[notificationEnabled].orTrue() }
}
override suspend fun setNotificationEnabledForDevice(enabled: Boolean) {

View file

@ -20,7 +20,7 @@ import io.element.android.libraries.pushstore.api.UserPushStore
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
class FakeUserPushStore: UserPushStore {
class FakeUserPushStore : UserPushStore {
private var pushProviderName: String? = null
private var currentRegisteredPushKey: String? = null
@ -54,6 +54,5 @@ class FakeUserPushStore: UserPushStore {
}
override suspend fun reset() {
}
}

View file

@ -20,9 +20,8 @@ import io.element.android.libraries.matrix.api.core.SessionId
import io.element.android.libraries.pushstore.api.UserPushStore
import io.element.android.libraries.pushstore.api.UserPushStoreFactory
class FakeUserPushStoreFactory: UserPushStoreFactory {
class FakeUserPushStoreFactory : UserPushStoreFactory {
override fun create(userId: SessionId): UserPushStore {
return FakeUserPushStore()
}
}