Skip to content

[News Downloader UI] Fix missing elements in the Add feeds window#13415

Merged
Frenzie merged 1 commit into
koreader:masterfrom
Blizarre:news-add-fix-missing-ui-elements
Mar 14, 2025
Merged

[News Downloader UI] Fix missing elements in the Add feeds window#13415
Frenzie merged 1 commit into
koreader:masterfrom
Blizarre:news-add-fix-missing-ui-elements

Conversation

@Blizarre

@Blizarre Blizarre commented Mar 14, 2025

Copy link
Copy Markdown
Contributor

In the News downloader, on the "Edit news feed" screen. Each field to display is stored in a table.

The current code will replace "empty" UI elements with a line (separator). However it is relying on the truthiness of the value of the field. If the value is False, for instance for the "download image" item, then the UI element for that field will be replaced with a line in the UI.

This PR just makes sure that we check for explicit "nil" value instead of truthiness.

We could also check value (and not value[2]) against a constant like SEPARATOR="---", and use that constant elsewhere in the code, but that would require larger code change.

Screenshots

This PR
good
Master
master


This change is Reviewable

The current code will replace "empty" UI elements with a line.
However it is relying on the truthiness of the value of the field.
If the value is False, for instance for the "download image" item,
then the UI element for that field will be replaced with a line in the
UI.

This PR just makes sure that we check for explicit "nil" value instead of
truthiness.

We could also check "value" (and not value[2]) against a constant
like `"SEPARATOR="---"` for instance but that would require larger
code change.
@Frenzie Frenzie added this to the 2025.03 milestone Mar 14, 2025
@Frenzie Frenzie merged commit 1193bd3 into koreader:master Mar 14, 2025
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
…ow (koreader#13415)

The current code will replace "empty" UI elements with a line.
However it is relying on the truthiness of the value of the field.
If the value is False, for instance for the "download image" item,
then the UI element for that field will be replaced with a line in the
UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants