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