mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-12 04:10:12 +08:00
stop triple on interrupted
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -84,6 +84,8 @@ mixin TripleMixin on GetxController, TickerProvider {
|
|||||||
_timer = null;
|
_timer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get isTripling => _tripleAnimCtr?.status == .forward;
|
||||||
|
|
||||||
static final _duration = PlatformUtils.isMobile
|
static final _duration = PlatformUtils.isMobile
|
||||||
? const Duration(milliseconds: 200)
|
? const Duration(milliseconds: 200)
|
||||||
: const Duration(milliseconds: 255);
|
: const Duration(milliseconds: 255);
|
||||||
@@ -104,7 +106,7 @@ mixin TripleMixin on GetxController, TickerProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onCancelTriple([bool isTapUp = false]) {
|
void onCancelTriple([bool isTapUp = false]) {
|
||||||
if (tripleAnimCtr.status == AnimationStatus.forward) {
|
if (tripleAnimCtr.status == .forward) {
|
||||||
tripleAnimCtr.reverse();
|
tripleAnimCtr.reverse();
|
||||||
} else if (_timer != null && _timer!.tick == 0) {
|
} else if (_timer != null && _timer!.tick == 0) {
|
||||||
_cancelTimer();
|
_cancelTimer();
|
||||||
|
|||||||
@@ -107,6 +107,10 @@ class PlayerFocus extends StatelessWidget {
|
|||||||
introController!.onCancelTriple(isKeyQ);
|
introController!.onCancelTriple(isKeyQ);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} else if (event is KeyDownEvent) {
|
||||||
|
if (introController?.isTripling ?? false) {
|
||||||
|
introController!.onCancelTriple();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final isArrowUp = key == LogicalKeyboardKey.arrowUp;
|
final isArrowUp = key == LogicalKeyboardKey.arrowUp;
|
||||||
|
|||||||
Reference in New Issue
Block a user