Refactor(MediaCheckDialog): Media check to use ViewModel#17943
Refactor(MediaCheckDialog): Media check to use ViewModel#17943david-allison merged 2 commits intoankidroid:mainfrom
Conversation
|
Important Maintainers: This PR contains Strings changes
|
bc072d9 to
7a503ca
Compare
18ef3d5 to
6b62901
Compare
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/mediacheck/ConfirmMediaCheckDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/mediacheck/MediaCheckResultDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/viewmodel/MediaCheckViewModel.kt
Outdated
Show resolved
Hide resolved
6b62901 to
337a7d4
Compare
93508d4 to
124a991
Compare
To resolve the issue in I am migrating the result from dialog to fragment. Why? Because the string builder is taking a lot of time to render strings i.e. 10k or 30k file names etc so its a heavy task for it, I have replicated the Anki behaviour in the fragment i.e. how it closes and how the user can interact with it |
9090d16 to
37301c4
Compare
lukstbit
left a comment
There was a problem hiding this comment.
I don't see why you introduced the current granularity with the number of commits. Reverting any of the first three commits will render the other two commits useless as the content is tightly tied together. It also makes reviewing harder.
So please squash the first three commits into a single commit.
Requested some changes, the implementation seems fine.
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/ConfirmMediaCheckDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/MediaCheckAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/MediaCheckAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/MediaCheckFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/MediaCheckFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/mediacheck/MediaCheckViewModel.kt
Outdated
Show resolved
Hide resolved
6ef3989 to
425ac64
Compare
1ce4763 to
2500af3
Compare
|
Yeah, fine for me. |
2500af3 to
3d0c793
Compare
3d0c793 to
b05e123
Compare
b05e123 to
6e4bd81
Compare
feat: add media check fragment file - feat: adapter for media check result - refactor: confirm media check dialog
- refactor: replace media check result dialog with fragment - refactor: remove unused parameter in Media.kt
6e4bd81 to
aafcb92
Compare
|
Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR. Read more about updating strings on the wiki, |
Purpose / Description
Migrates the logic of MediaCheck to ViewModel
Split the dialog logic, use different dialog for result and conformation
Fixes
Approach
Use ViewModel to handle the media check dialog and its result
How Has This Been Tested?
Tested on Google emulator API31
Screen_recording_20250220_045658.webm
Checklist
Please, go through these checks before submitting the PR.