Repository navigation
feat: Allow card options in notes mode - #19676
Conversation
7fbbb17 to
c450bb1
Compare
david-allison
left a comment
There was a problem hiding this comment.
Tests are excellent, thank you!
Minor nitpick on removing the comment - not necessary if you're happy you tested it
Link the cause of this warning, so people can understand how the feature came to be (likely in the commit message):
Could you add justification for why this works now, but was inconclusive/broken at the time
For example:
- #17962 fixed reposition
c450bb1 to
35b7b48
Compare
|
This doesn't seem to address:
|
35b7b48 to
9b782d4
Compare
|
ah my bad i was on the airport just got some time there so i resolved the comments; missed the original message. Updated the commit message now! |
There was a problem hiding this comment.
That's the PR where the restrictions were added, not justification for why they can be removed.
I want this in, so, could you add this to the commit message:
I want to block this from merging on getting the commit message/documentation of the change correct
But, the code is correct.
Needs Second Approval
|
With link previews |
9b782d4 to
bbfdc59
Compare
bbfdc59 to
0aba38c
Compare
eb22d6e to
0aba38c
Compare
Fix ankidroid#18307 Relates to ankidroid#15509 - Remove warnUserIfInNotesOnlyMode() method from CardBrowser - Enable reposition, set due date, and reset progress in notes mode - Operations now correctly affect all cards of selected notes - Add verification logging for data integrity - Remove unused string resource The Card Browser previously blocked reposition, set due date, and reset progress operations when in notes mode. This restriction was added in commit 530bdb4 as a temporary measure after fixing ankidroid#15509, where operations only affected one card per note. The underlying infrastructure (queryAllSelectedCardIds) was subsequently fixed to correctly handle notes mode: Reschedule: d847d91 (issue 15699) Reposition: 4db4dfb (issue 17962) Reset: e3fa840 (issue 17176) Tests: CardBrowserViewModelTest
0aba38c to
7ec9f65
Compare
Purpose / Description
Card Browser previously blocked reposition, set due date, and reset progress operations in notes mode with an error message. Desktop Anki allows these operations via the Cards submenu.
Fixes
Approach
Removed
warnUserIfInNotesOnlyMode()blocking method fromCardBrowser.ktand its checks from three operations inCardBrowserFragment.kt:rescheduleSelectedCards()repositionSelectedCards()onResetProgress()Added verification logging for data integrity. The existing
queryAllSelectedCardIds()already handles both modes correctly ; querying all card IDs for selected notes when in notes mode.How Has This Been Tested?
By unit tests and manual testing ;
Added 2 tests in
CardBrowserViewModelTest.kt:reposition in notes mode affects all cards 18307- Verifies repositioning affects all cards of selected notesreset progress in notes mode affects all cards 18307- Verifies reset affects all cards of selected notesRun:
./gradlew :AnkiDroid:testPlayDebugUnitTest --tests "*18307"Both tests will pass.
Checklist
Please, go through these checks before submitting the PR.