From 5b4bcb5acc2462a68ac9f3f6a7facb8e7fe89bd9 Mon Sep 17 00:00:00 2001 From: William Jordan-Cooley Date: Tue, 8 Oct 2024 15:47:15 -0400 Subject: [PATCH] additional logic to showing of it inline tooltip --- lib/pangea/choreographer/widgets/it_bar.dart | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/pangea/choreographer/widgets/it_bar.dart b/lib/pangea/choreographer/widgets/it_bar.dart index 9e37112ea..bfc4a174d 100644 --- a/lib/pangea/choreographer/widgets/it_bar.dart +++ b/lib/pangea/choreographer/widgets/it_bar.dart @@ -114,8 +114,7 @@ class ITBarState extends State { // const SizedBox(height: 40.0), OriginalText(controller: itController), const SizedBox(height: 7.0), - if (!InstructionsEnum.translationChoices - .toggledOff(context)) + if (showTranslationsChoicesTooltip) InlineTooltip( instructionsEnum: InstructionsEnum.translationChoices, @@ -167,6 +166,16 @@ class ITBarState extends State { ), ); } + + bool get showTranslationsChoicesTooltip { + return !itController.choreographer.isFetching && + !itController.isLoading && + !itController.isEditingSourceText && + !itController.isTranslationDone && + itController.currentITStep != null && + itController.currentITStep!.continuances.isNotEmpty && + !itController.showChoiceFeedback; + } } class ChoiceFeedbackText extends StatelessWidget {