File tree 1 file changed +2
-7
lines changed
app/src/main/java/com/nononsenseapps/feeder/ui/compose/feed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,6 @@ fun SwipeableFeedItemPreview(
92
92
val coroutineScope = rememberCoroutineScope()
93
93
val isRtl = LocalLayoutDirection .current == LayoutDirection .Rtl
94
94
val swipeableState = rememberSwipeableState(initialValue = FeedItemSwipeState .NONE )
95
- var ignoreSwipes by remember {
96
- mutableStateOf(false )
97
- }
98
95
99
96
val color by animateColorAsState(
100
97
targetValue =
@@ -108,13 +105,11 @@ fun SwipeableFeedItemPreview(
108
105
109
106
LaunchedEffect (filter, item.unread) {
110
107
// critical state changes - reset ui state
111
- ignoreSwipes = true
112
108
swipeableState.animateTo(FeedItemSwipeState .NONE )
113
- ignoreSwipes = false
114
109
}
115
110
116
- LaunchedEffect (swipeableState.currentValue) {
117
- if (! ignoreSwipes && swipeableState.currentValue != FeedItemSwipeState .NONE ) {
111
+ LaunchedEffect (swipeableState.currentValue, swipeableState.isAnimationRunning ) {
112
+ if (! swipeableState.isAnimationRunning && swipeableState.currentValue != FeedItemSwipeState .NONE ) {
118
113
logDebug(LOG_TAG , " onSwipe ${item.unread} " )
119
114
onSwipe(item.unread)
120
115
}
You can’t perform that action at this time.
0 commit comments