Skip to content

Commit

Permalink
Fix Anki dialog opened from manual recording not including all subs
Browse files Browse the repository at this point in the history
- Note: seems to be side effect of 'text' field being explicitly
  provided when other keyboard shortcuts are used, while manual
  recording leaves it blank.
  • Loading branch information
killergerbah committed Feb 4, 2024
1 parent bba63aa commit 2bd6eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/components/AnkiDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const AnkiDialog = ({
timestampInterval === undefined
? []
: card.surroundingSubtitles.filter((s) => subtitleIntersectsTimeInterval(s, timestampInterval));
setText(initialText ?? card.subtitle.text ?? joinSubtitles(selectedSubtitles));
setText(initialText ?? joinSubtitles(selectedSubtitles) ?? card.subtitle.text);
setTimestampInterval(timestampInterval);
setSelectedSubtitles(selectedSubtitles);
setInitialTimestampInterval(forceInitialTimestampInterval || timestampInterval);
Expand Down

0 comments on commit 2bd6eaf

Please sign in to comment.