mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
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:
-1
@@ -17,7 +17,6 @@
|
||||
package io.element.android.libraries.pushstore.api
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
|
||||
/**
|
||||
* Store data related to push about a user.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
+1
-2
@@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user