-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix color scheme for empty cards report dialog #17985
Fix color scheme for empty cards report dialog #17985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, optional nitpicks
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/EmptyCardsDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/EmptyCardsDialogFragment.kt
Show resolved
Hide resolved
5b49b5f
to
41cdcad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approval still stands
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/EmptyCardsDialogFragment.kt
Show resolved
Hide resolved
This removes the initial implementation using an WebView in favor of a TextView and parsing the report with HtmlCompat. The nids links are now implemented through ClickSpans. Also adds a test to check the html backend report structure to make sure the report parsing code present in EmptyCardsFragment stays relevant.
41cdcad
to
37f45a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good. I tried using ClickableSpan
in the last PR, but didn't manage in the first try. Great job!
Purpose / Description
Replaced the previous implementation using an WebView with a TextView using HtmlCompat and text spans for the click behavior. Also added a test to prevent unexpected backend changes to the html report structure that we expect.
How it looks with the fix
Fixes
How Has This Been Tested?
Ran the tests, checked all themes, checked the expected behavior.
Checklist