Skip to content

Filter subscriptions by channel group#13489

Open
vbrankov wants to merge 4 commits into
TeamNewPipe:refactorfrom
vbrankov:feature/subscription-group-channels
Open

Filter subscriptions by channel group#13489
vbrankov wants to merge 4 commits into
TeamNewPipe:refactorfrom
vbrankov:feature/subscription-group-channels

Conversation

@vbrankov
Copy link
Copy Markdown

@vbrankov vbrankov commented May 9, 2026

What is it?

  • Bugfix (user facing)
  • Feature (user facing) ⚠️targets refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Tapping a channel group on the Subscriptions page now selects it and filters the channel list below to show only channels belonging to that group
  • Tapping an already-selected group opens its recent videos feed (previous behaviour)
  • "All" is selected by default, showing all subscriptions
  • A new "Ungrouped" group is added at the end of the carousel, filtering the list to channels not assigned to any group

Before/After Screenshots/Screen Record

Screen-20260509-132434.mp4

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this
wiki page
.

Due diligence

  • I read the contribution guidelines.
  • The proposed changes follow the AI policy.
  • I tested the changes using an emulator or a physical device.

Tapping a channel group now selects it and filters the subscriptions
grid to show only channels in that group. Tapping the already-selected
group opens its recent videos feed. The selected group is highlighted
with an accent-tinted card background.

- Add getSubscriptionsForGroup() DAO query (INNER JOIN on group membership)
- Route getSubscriptions() through the new query when a non-All group is selected
- Track selected group in SubscriptionViewModel via BehaviorProcessor, making
  the subscriptions stream reactive to selection changes via switchMap
- Add isSelected flag to FeedGroupCardItem/FeedGroupCardGridItem with visual
  highlight using a 15% accent colour blend on the card background
- Refactor SubscriptionFragment carousel rebuild into rebuildCarousel() so it
  responds to both DB changes and selection changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/medium PRs with less than 250 changed lines label May 9, 2026
@vbrankov vbrankov closed this May 9, 2026
vbrankov and others added 2 commits May 9, 2026 12:48
Selecting the new "Ungrouped" group filters the subscriptions grid to
show only channels that don't belong to any group, making it easy to
see which channels still need to be categorised.

- Add GROUP_UNGROUPED_ID = -2L constant to FeedGroupEntity
- Add getSubscriptionsNotInAnyGroup() DAO query (LEFT JOIN, IS NULL)
- Route getSubscriptions() to that query for GROUP_UNGROUPED_ID
- Add "Ungrouped" card at the end of the groups carousel
- Add feed_group_ungrouped string resource

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
getSubscriptions() is used by FeedGroupDialog to display all channels
with checkmarks on those in the group. Our group-filtering logic was
incorrectly intercepting that call. Extract subscriptionsFilteredByGroup()
as a separate method used only by the subscriptions page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vbrankov vbrankov reopened this May 9, 2026
- Block long-press on Ungrouped (virtual group) to prevent opening edit
  dialog with invalid ID; extract groupId before the guard check
- Block feed navigation on double-tap of Ungrouped (no feed exists for
  virtual groups); second tap re-selects instead of navigating
- Move selectedId read inside post{} to avoid stale capture before the
  Runnable executes
- Handle GROUP_UNGROUPED_ID in getId() alongside GROUP_ALL_ID
- Replace LEFT JOIN + IS NULL with NOT EXISTS for getSubscriptionsNotInAnyGroup
  (cleaner intent, avoids @RewriteQueriesToDropUnusedColumns)
- Initialise currentListViewMode from ViewModel rather than hardcoded true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ShareASmile ShareASmile added feature request Issue is related to a feature in the app channel group Anything to do with channel groups in the app labels May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel group Anything to do with channel groups in the app feature request Issue is related to a feature in the app size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants