RoomDirectory : address pr reviews

This commit is contained in:
ganfra 2024-03-29 11:37:00 +01:00
parent 856a897018
commit 5e4eed68b5
6 changed files with 6 additions and 8 deletions

View file

@ -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)

View file

@ -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) {