mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +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
-1
@@ -20,7 +20,7 @@ import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.user.MatrixUser
|
||||
|
||||
interface UserListDataSource {
|
||||
//TODO should probably have a flow
|
||||
// TODO should probably have a flow
|
||||
suspend fun search(query: String, count: Long): List<MatrixUser>
|
||||
suspend fun getProfile(userId: UserId): MatrixUser?
|
||||
}
|
||||
|
||||
+2
-1
@@ -70,7 +70,8 @@ class MatrixUserRepository @Inject constructor(
|
||||
0,
|
||||
dataSource.getProfile(UserId(query))
|
||||
?.let { UserSearchResult(it) }
|
||||
?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true))
|
||||
?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)
|
||||
)
|
||||
}
|
||||
|
||||
return UserSearchResultState(results = results, isSearching = false)
|
||||
|
||||
-1
@@ -212,5 +212,4 @@ internal class MatrixUserRepositoryTest {
|
||||
private fun List<MatrixUser>.toUserSearchResults() = map { UserSearchResult(it) }
|
||||
|
||||
private fun placeholderResult(id: UserId = A_USER_ID, isUnresolved: Boolean = false) = UserSearchResult(MatrixUser(id), isUnresolved = isUnresolved)
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -36,5 +36,4 @@ class FakeUserRepository : UserRepository {
|
||||
suspend fun emitState(state: UserSearchResultState) {
|
||||
flow.emit(state)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user