Updated on 2026-08-14

This commit is contained in:
Tangem 2022-06-14 11:59:40 +03:00
commit d6be9f1311
27 changed files with 147 additions and 142 deletions

View file

@ -2,6 +2,8 @@ package com.tangem.tap.common.compose.extensions
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.*
import androidx.compose.ui.platform.LocalView
import com.tangem.tap.common.extensions.hideKeyboard
@Composable
fun LazyListState.OnBottomReached(loadMoreThreshold: Int, loadMore: () -> Unit) {
@ -17,4 +19,11 @@ fun LazyListState.OnBottomReached(loadMoreThreshold: Int, loadMore: () -> Unit)
LaunchedEffect(shouldLoadMore) {
if (shouldLoadMore) loadMore()
}
}
@Composable
fun LazyListState.HideKeyboardOnScroll() {
if (isScrollInProgress) {
LocalView.current.hideKeyboard()
}
}