RoomDirectory : address pr reviews
This commit is contained in:
parent
d94f4b0392
commit
5f8b74055d
6 changed files with 6 additions and 8 deletions
|
|
@ -14,8 +14,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed
|
||||
@Suppress("DSL_SCOPE_VIOLATION")
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.anvil)
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ class RoomDirectoryPresenter @Inject constructor(
|
|||
}
|
||||
LaunchedEffect(searchQuery) {
|
||||
if (searchQuery == null) return@LaunchedEffect
|
||||
// debounce search query
|
||||
delay(300)
|
||||
// cancel load more right away
|
||||
loadingMore = false
|
||||
// debounce search query
|
||||
delay(300)
|
||||
roomDirectoryList.filter(searchQuery, 20)
|
||||
}
|
||||
LaunchedEffect(loadingMore) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ enum class FeatureFlags(
|
|||
RoomDirectorySearch(
|
||||
key = "feature.roomdirectorysearch",
|
||||
title = "Room directory search",
|
||||
description = "Allow user to search for public rooms in his homeserver",
|
||||
description = "Allow user to search for public rooms in their homeserver",
|
||||
defaultValue = true,
|
||||
isFinished = false,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ data class RoomDescription(
|
|||
val avatarUrl: String?,
|
||||
val joinRule: JoinRule,
|
||||
val isWorldReadable: Boolean,
|
||||
val joinedMembers: Long
|
||||
val numberOfMembers: Long
|
||||
) {
|
||||
enum class JoinRule {
|
||||
PUBLIC,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class RoomDescriptionMapper {
|
|||
null -> RoomDescription.JoinRule.UNKNOWN
|
||||
},
|
||||
isWorldReadable = roomDescription.isWorldReadable,
|
||||
joinedMembers = roomDescription.joinedMembers.toLong(),
|
||||
numberOfMembers = roomDescription.joinedMembers.toLong(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@ fun aRoomDescription(
|
|||
avatarUrl = avatarUrl,
|
||||
joinRule = joinRule,
|
||||
isWorldReadable = isWorldReadable,
|
||||
joinedMembers = joinedMembers
|
||||
numberOfMembers = joinedMembers
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue