diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt b/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt index 868f946ca38d..0c0ca89d8ef7 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt @@ -1168,6 +1168,10 @@ open class Reviewer : openCardInfo(fromGesture) return true } + ViewerCommand.RESCHEDULE_NOTE -> { + showRescheduleCardDialog() + return true + } else -> return super.executeCommand(which, fromGesture) } } diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/analytics/UsageAnalytics.kt b/AnkiDroid/src/main/java/com/ichi2/anki/analytics/UsageAnalytics.kt index 230fd03b81b8..16fcb3feaec4 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/analytics/UsageAnalytics.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/analytics/UsageAnalytics.kt @@ -530,6 +530,7 @@ object UsageAnalytics { "binding_SHOW_HINT", "binding_SHOW_ALL_HINTS", "binding_ADD_NOTE", + "binding_RESCHEDULE_NOTE", // Accessibility "cardZoom", "imageZoom", diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/ViewerCommand.kt b/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/ViewerCommand.kt index 79b9dcee1ac2..4b3d8dbaddb4 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/ViewerCommand.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/cardviewer/ViewerCommand.kt @@ -71,7 +71,8 @@ enum class ViewerCommand(val resourceId: Int) { CHANGE_WHITEBOARD_PEN_COLOR(R.string.title_whiteboard_editor), SHOW_HINT(R.string.gesture_show_hint), SHOW_ALL_HINTS(R.string.gesture_show_all_hints), - ADD_NOTE(R.string.menu_add_note); + ADD_NOTE(R.string.menu_add_note), + RESCHEDULE_NOTE(R.string.card_editor_reschedule_card); companion object { val allDefaultBindings: List diff --git a/AnkiDroid/src/test/java/com/ichi2/anki/cardviewer/ViewerCommandTest.kt b/AnkiDroid/src/test/java/com/ichi2/anki/cardviewer/ViewerCommandTest.kt index 144548ec500a..ca779f4867e6 100644 --- a/AnkiDroid/src/test/java/com/ichi2/anki/cardviewer/ViewerCommandTest.kt +++ b/AnkiDroid/src/test/java/com/ichi2/anki/cardviewer/ViewerCommandTest.kt @@ -40,7 +40,8 @@ class ViewerCommandTest { "binding_TOGGLE_FLAG_PINK, binding_TOGGLE_FLAG_TURQUOISE, binding_TOGGLE_FLAG_PURPLE, " + "binding_UNSET_FLAG, binding_PAGE_UP, binding_PAGE_DOWN, binding_TAG, binding_CARD_INFO, binding_ABORT_AND_SYNC, " + "binding_RECORD_VOICE, binding_REPLAY_VOICE, binding_TOGGLE_WHITEBOARD, binding_CLEAR_WHITEBOARD, " + - "binding_CHANGE_WHITEBOARD_PEN_COLOR, binding_SHOW_HINT, binding_SHOW_ALL_HINTS, binding_ADD_NOTE", + "binding_CHANGE_WHITEBOARD_PEN_COLOR, binding_SHOW_HINT, binding_SHOW_ALL_HINTS, binding_ADD_NOTE, " + + "binding_RESCHEDULE_NOTE", names ) }