Skip to content

Commit

Permalink
support legacy/tailcontrol on actions page supported gear indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Dec 21, 2024
1 parent ccceb2c commit b4396ae
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion lib/Frontend/pages/actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class _ActionCardState extends ConsumerState<ActionCard> {
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,
Expand All @@ -193,6 +193,25 @@ class _ActionCardState extends ConsumerState<ActionCard> {
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),
Expand Down

0 comments on commit b4396ae

Please sign in to comment.