Commit fc7bb43
fix(image-occlusion): support updating a note's deck
Once a note had been created, the deck couldn't be updated.
Fixed by:
* Enable editing the deck in NoteEditorFragment if in edit mode
* Disable editing the deck in ImageOcclusion if in edit mode
In future, we can handle this in ImageOcclusion, BUT:
There are 3 cases:
* A user wants to edit a card when studying
* A user wants to edit a selection of cards from the same note [Card Browser - CARDS]
* A user wants to edit a note [Card Browser - NOTES]
* What does it mean to edit the deck of a note, is a user aware of this?
And a user can remove the cards they are editing (by removing masks).
Since we don't yet have full control over the process of adding an occlusion note,
I decided it was a risk to take the time to implement this
Fixes 196051 parent 3c9a950 commit fc7bb43
File tree
4 files changed
+288
-33
lines changed- AnkiDroid/src
- main/java/com/ichi2/anki
- pages
- viewmodel
- test/java/com/ichi2/anki/pages/viewmodel
4 files changed
+288
-33
lines changedLines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
2426 | | - | |
2427 | | - | |
2428 | | - | |
2429 | | - | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2430 | 2431 | | |
2431 | 2432 | | |
2432 | 2433 | | |
| |||
2764 | 2765 | | |
2765 | 2766 | | |
2766 | 2767 | | |
2767 | | - | |
| 2768 | + | |
2768 | 2769 | | |
2769 | 2770 | | |
2770 | 2771 | | |
2771 | 2772 | | |
2772 | | - | |
2773 | 2773 | | |
2774 | 2774 | | |
2775 | 2775 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
135 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
Lines changed: 46 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
56 | | - | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 62 | | |
71 | 63 | | |
72 | 64 | | |
| |||
98 | 90 | | |
99 | 91 | | |
100 | 92 | | |
101 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
103 | 108 | | |
104 | | - | |
105 | | - | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | | - | |
109 | | - | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | | - | |
112 | | - | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
129 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
134 | 153 | | |
135 | | - | |
| 154 | + | |
| 155 | + | |
136 | 156 | | |
137 | 157 | | |
138 | 158 | | |
| |||
0 commit comments