Skip to content

mobile: don't blank the torrent list when the label panel is incomplete - #3133

Merged
xirvik merged 1 commit into
Novik:masterfrom
xirvik:fix/mobile-empty-torrent-list
Jul 25, 2026
Merged

mobile: don't blank the torrent list when the label panel is incomplete#3133
xirvik merged 1 commit into
Novik:masterfrom
xirvik:fix/mobile-empty-torrent-list

Conversation

@xirvik

@xirvik xirvik commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

processTorrents() read the desktop categoryList "plabel" panel unconditionally to build the label filter list. That access threw a TypeError in two real situations, aborting the function before any row was rendered and leaving the torrent list blank (the error was swallowed by the update request's empty error handler):

  • the panel is not always populated when the mobile view first paints;
  • the "no label" bucket ("---nlb---") only exists when at least one torrent is unlabelled, so it is missing when every torrent has a label -- a common configuration.

Guard both reads: fall back to a zero "no label" count and skip the label loop when the panel is absent. When the panel is present the behaviour is unchanged.

processTorrents() read the desktop categoryList "plabel" panel
unconditionally to build the label filter list. That access threw a
TypeError in two real situations, aborting the function before any row
was rendered and leaving the torrent list blank (the error was swallowed
by the update request's empty error handler):

  - the panel is not always populated when the mobile view first paints;
  - the "no label" bucket ("-_-_-nlb-_-_-") only exists when at least one
    torrent is unlabelled, so it is missing when every torrent has a
    label -- a common configuration.

Guard both reads: fall back to a zero "no label" count and skip the
label loop when the panel is absent. When the panel is present the
behaviour is unchanged.
@xirvik
xirvik merged commit 5ec6b72 into Novik:master Jul 25, 2026
5 checks passed
@xirvik
xirvik deleted the fix/mobile-empty-torrent-list branch July 25, 2026 02:03
@xirvik xirvik mentioned this pull request Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant