Updated on 2026-08-14
This commit is contained in:
commit
d6be9f1311
27 changed files with 147 additions and 142 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue