Skip to content

Commit fbc1652

Browse files
committed
fix: Swipe ActionResult (#1334)
1 parent fd24993 commit fbc1652

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/src/main/kotlin/li/songe/gkd/data/GkdAction.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,17 @@ sealed class ActionPerformer(val action: String) {
210210
locationProps: RawSubscription.LocationProps,
211211
): ActionResult {
212212
val rect = node.casted.boundsInScreen
213-
val swipeArg = locationProps.swipeArg ?: return None.perform(node, locationProps)
213+
val swipeArg = locationProps.swipeArg ?: return ActionResult(
214+
action = action,
215+
result = false,
216+
)
214217
val startP = swipeArg.start.calc(rect)
215218
val endP = swipeArg.end?.calc(rect) ?: startP
216219
if (startP == null || endP == null) {
217-
return None.perform(node, locationProps)
220+
return ActionResult(
221+
action = action,
222+
result = false,
223+
)
218224
}
219225
val startX = startP.first
220226
val startY = startP.second

0 commit comments

Comments
 (0)