fix: card repositioning doesn't work for suspended card(s)#20316
Open
saifkaral wants to merge 5 commits intoankidroid:mainfrom
Open
fix: card repositioning doesn't work for suspended card(s)#20316saifkaral wants to merge 5 commits intoankidroid:mainfrom
saifkaral wants to merge 5 commits intoankidroid:mainfrom
Conversation
Member
|
Could this discussion be moved to the linked issue: Anki Desktop allows users to reposition cards which are already studied (having no effect). We continue to differ from this functionality, and this implementation doesn't feel like it was discussed. Selecting all cards and repositioning may be perfectly valid. The only case which is truly questionable is when all cards are not repositionable. |
4 tasks
d720f1d to
d07e168
Compare
Member
david-allison
left a comment
There was a problem hiding this comment.
Almost there, cheers! Thanks so much for the fast turnaround
AnkiDroid/src/test/java/com/ichi2/anki/browser/CardBrowserViewModelTest.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/test/java/com/ichi2/anki/browser/CardBrowserViewModelTest.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/test/java/com/ichi2/anki/browser/CardBrowserViewModelTest.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
d967717 to
3f98a40
Compare
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
david-allison
requested changes
Mar 5, 2026
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserFragment.kt
Outdated
Show resolved
Hide resolved
david-allison
approved these changes
Mar 5, 2026
Member
david-allison
left a comment
There was a problem hiding this comment.
Truly excellent stuff, thanks!
Member
|
It will be slightly easier for us to merge if you squash merge this to 1 commit + force push Since it's your first PR, don't worry too much about this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose / Description
Previously if the user tried to reposition a suspended card or a group of suspended cards or a group of cards that includes one or more suspended cards the app gives them an error message "Only new cards can be repositioned".
Fixes
Approach
This fix now allows the user to freely reposition suspended cards given that theses cards weren't reviewed before.
How Has This Been Tested?
Tested by trying all the combinations I listed above and observe if the bug persists, also added a test case
Checklist
Please, go through these checks before submitting the PR.