Skip to content

Commit

Permalink
fix: new reviewer crashes when adding a note
Browse files Browse the repository at this point in the history
  • Loading branch information
voczi authored and BrayanDSO committed Aug 18, 2024
1 parent 6967cc8 commit ce6b086
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import com.ichi2.anki.Flag
import com.ichi2.anki.NoteEditor
import com.ichi2.anki.R
import com.ichi2.anki.cardviewer.CardMediaPlayer
import com.ichi2.anki.noteeditor.NoteEditorLauncher
import com.ichi2.anki.previewer.CardViewerActivity
import com.ichi2.anki.previewer.CardViewerFragment
import com.ichi2.anki.snackbar.BaseSnackbarBuilderProvider
Expand Down Expand Up @@ -366,9 +367,7 @@ class ReviewerFragment :
}

private fun launchAddNote() {
val intent = Intent(context, NoteEditor::class.java).apply {
putExtra(NoteEditor.EXTRA_CALLER, NoteEditor.CALLER_REVIEWER_ADD)
}
val intent = NoteEditorLauncher.AddNoteFromReviewer().getIntent(requireContext())
noteEditorLauncher.launch(intent)
}

Expand Down

0 comments on commit ce6b086

Please sign in to comment.