Skip to content

Commit

Permalink
Fix inconsistent sentence suffix icon color on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed Jul 12, 2021
1 parent 77defef commit 0dc8d29
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/anki.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ Future exportToAnki(
int audioAllowance,
int subtitleDelay,
ValueNotifier<AnkiExportMetadata> failureMetadata,
String regexFilter,
) async {
String lastDeck = getLastDeck();

Expand Down Expand Up @@ -231,9 +232,14 @@ Future exportToAnki(
);
clipboard.value = "";

String sentence = subtitle.text;
if (regexFilter.isNotEmpty) {
sentence = sentence.replaceAll(RegExp(regexFilter), "");
}

showAnkiDialog(
context,
subtitle.text,
sentence,
dictionaryEntry,
decks,
lastDeck,
Expand Down
10 changes: 8 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4889,7 +4889,10 @@ class _CreatorState extends State<Creator> {
showSentenceDialog(_sentenceController.text);
}
},
icon: Icon(Icons.account_tree_outlined),
icon: Icon(
Icons.account_tree_outlined,
color: Colors.white,
),
),
IconButton(
iconSize: 18,
Expand All @@ -4899,7 +4902,10 @@ class _CreatorState extends State<Creator> {
_isReader.value = false;
});
},
icon: Icon(Icons.clear, color: Colors.white),
icon: Icon(
Icons.clear,
color: Colors.white,
),
),
],
),
Expand Down
3 changes: 3 additions & 0 deletions lib/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ class _VideoPlayerState extends State<VideoPlayer>
_audioAllowance.value,
getSubtitleController().subtitlesOffset,
_failureMetadata,
_regexFilter.value,
);
}

Expand Down Expand Up @@ -829,6 +830,7 @@ class _VideoPlayerState extends State<VideoPlayer>
_audioAllowance.value,
getSubtitleController().subtitlesOffset,
_failureMetadata,
_regexFilter.value,
);
}

Expand Down Expand Up @@ -1520,6 +1522,7 @@ class _VideoPlayerState extends State<VideoPlayer>
metadata.audioAllowance,
metadata.subtitleDelay,
_failureMetadata,
_regexFilter.value,
);

_failureMetadata.value = null;
Expand Down

0 comments on commit 0dc8d29

Please sign in to comment.