Skip to content

Commit

Permalink
Merge pull request #410 from pangeachat/remove-postframe-toolbar
Browse files Browse the repository at this point in the history
move _instructionsShown up to be the first check in instructions show…
  • Loading branch information
ggurdin authored Jun 28, 2024
2 parents 535950d + d6e2bcd commit 3d1e354
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pangea/utils/instructions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class InstructionsController {
String transformTargetKey, [
bool showToggle = true,
]) async {
if (_instructionsShown[key] ?? false) {
return;
}
_instructionsShown[key] = true;

if (wereInstructionsTurnedOff(key)) {
return;
}
Expand All @@ -51,18 +56,13 @@ class InstructionsController {
);
return;
}
if (_instructionsShown[key] ?? false) {
return;
}

final bool userLangsSet =
await _pangeaController.userController.areUserLanguagesSet;
if (!userLangsSet) {
return;
}

_instructionsShown[key] = true;

final botStyle = BotStyle.text(context);
Future.delayed(
const Duration(seconds: 1),
Expand Down

0 comments on commit 3d1e354

Please sign in to comment.