mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-03 17:47:30 +01:00
fix(common-ui): haptic feedback while swiping
This commit is contained in:
parent
ac6ef7a9da
commit
a3cfd89c95
@ -27,6 +27,7 @@ import androidx.compose.ui.unit.toSize
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.flow.stateIn
|
||||
|
||||
@OptIn(ExperimentalMaterialApi::class)
|
||||
@Composable
|
||||
@ -71,7 +72,7 @@ fun SwipeableCard(
|
||||
it < -width * threshold -> DismissDirection.EndToStart
|
||||
else -> null
|
||||
}
|
||||
}.onEach { willDismissDirection ->
|
||||
}.stateIn(this).onEach { willDismissDirection ->
|
||||
if (willDismissDirection != null) {
|
||||
onGestureBegin()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user