From b4396aeb04bfd8aab0101163199cac3fb5062584 Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Fri, 20 Dec 2024 19:28:31 -0500 Subject: [PATCH] support legacy/tailcontrol on actions page supported gear indicators --- lib/Frontend/pages/actions.dart | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/Frontend/pages/actions.dart b/lib/Frontend/pages/actions.dart index 49dd2f56..5e13b8e6 100644 --- a/lib/Frontend/pages/actions.dart +++ b/lib/Frontend/pages/actions.dart @@ -181,7 +181,7 @@ class _ActionCardState extends ConsumerState { children: [ // Shows when an action is in progress AnimatedCrossFade( - firstChild: Container(), + firstChild: Center(child: Container()), secondChild: const Center(child: CircularProgressIndicator()), crossFadeState: ref.watch(isGearMoveRunningProvider(widget.action.deviceCategory.toBuiltSet())) ? CrossFadeState.showSecond : CrossFadeState.showFirst, alignment: Alignment.center, @@ -193,6 +193,25 @@ class _ActionCardState extends ConsumerState { child: Row( children: ref .watch(getAvailableGearForTypeProvider(widget.action.deviceCategory.toBuiltSet())) + .where( + (baseStatefulDevice) { + //TODO: remove after tailcontrol migration period + if (widget.action.deviceCategory.contains(DeviceType.ears) && baseStatefulDevice.baseDeviceDefinition.deviceType == DeviceType.ears) { + if (baseStatefulDevice.isTailCoNTROL.value == tailControlStatus.tailControl) { + // skip legacy moves + if (widget.action is EarsMoveList) { + return false; + } + // skip unified moves for legacy firmware ears + } else if (baseStatefulDevice.isTailCoNTROL.value == tailControlStatus.legacy) { + if (widget.action is CommandAction) { + return false; + } + } + } + return true; + }, + ) .map( (e) => Card( color: Color(e.baseStoredDevice.color),