File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
AnkiDroid/src/main/java/com/ichi2/anki/pages Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,20 @@ import com.ichi2.anki.startDeckSelection
4444import kotlinx.coroutines.launch
4545import timber.log.Timber
4646
47+ /* *
48+ * Page provided by the backend, for a user to add or edit an image occlusion (IO) note
49+ *
50+ * IO: Like an image-based cloze: hide parts of an image, revealed on the back
51+ * ([docs](https://docs.ankiweb.net/editing.html#image-occlusion) and
52+ * [source](https://github.com/ankitects/anki/blob/main/proto/anki/image_occlusion.proto)).
53+ *
54+ * **Paths**
55+ * `/image-occlusion/$PATH`
56+ * `/image-occlusion/$NOTE_ID`
57+ *
58+ * @see ImageOcclusionViewModel
59+ * @see ImageOcclusion.getIntent
60+ */
4761class ImageOcclusion :
4862 PageFragment (R .layout.image_occlusion),
4963 DeckSelectionDialog .DeckSelectionListener {
Original file line number Diff line number Diff line change @@ -52,8 +52,10 @@ class ImageOcclusionViewModel(
5252 val oldDeckId: Long
5353
5454 /* *
55- * A [JSONObject] containing options for initializing the WebView. This includes
56- * the type of operation ("add" or "edit"), and relevant IDs and paths.
55+ * A [JSONObject] containing options for loading the [image occlusion page][ImageOcclusion].
56+ * This includes the type of operation ("add" or "edit"), and relevant IDs and paths.
57+ *
58+ * Defined in https://github.com/ankitects/anki/blob/main/ts/routes/image-occlusion/lib.ts
5759 */
5860 val webViewOptions: JSONObject
5961
@@ -86,6 +88,9 @@ class ImageOcclusionViewModel(
8688 return true
8789 }
8890
91+ /* *
92+ * Executed when the 'save' operation is completed, before the UI receives the response
93+ */
8994 fun onSaveOperationCompleted () {
9095 Timber .i(" save operation completed" )
9196 if (oldDeckId == selectedDeckId) return
You can’t perform that action at this time.
0 commit comments