Skip to content

Changes in the header section for history#13368

Open
Cellulose-Type-C wants to merge 6 commits intoTeamNewPipe:devfrom
Cellulose-Type-C:dev
Open

Changes in the header section for history#13368
Cellulose-Type-C wants to merge 6 commits intoTeamNewPipe:devfrom
Cellulose-Type-C:dev

Conversation

@Cellulose-Type-C
Copy link

What is it?

  • [ √] Feature (user facing)

Description of the changes in your PR

Added a new DATE_HEADER variant to LocalItemType and introduced a DateHeaderItem model carrying a LocalDate for section grouping in history lists.

Added a dedicated date header row layout (list_date_header_item.xml) with emphasized text and container background styling for visual separation between date groups.

Updated LocalItemListAdapter to support a new date-header view type: type mapping, holder creation/binding, and full-span behavior in grid mode so headers render as separators across the whole row.

Changed history result processing in StatisticsPlaylistFragment to return List, inject DateHeaderItem boundaries only for LAST_PLAYED, keep MOST_PLAYED flat, and pass the mixed list directly into the adapter.

Adjusted queue-start index calculation to count only stream items so interleaved date headers do not shift the playback starting position.

Removed per-item date text from statistic stream detail lines; details now show watch count + service only, with date represented by section headers above.

Before/After Screenshots/Screen Record

  • Before:
Screenshot_2026_0321_112648
  • After:
Screenshot_2026_0321_112703

Fixes the following issue(s)

  • Fixes #

Relies on the following changes

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.

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Mar 21, 2026
@Cellulose-Type-C
Copy link
Author

Please note this personal project. I was kinda frustrated by tiny date inline for Newpipe so I changed the codebase so it can show a big banner under which all videos are shown for the same date.
To make this work, the codebase needed a new item kind. LocalItemType got a DATE_HEADER variant, and DateHeaderItem is the model that carries a LocalDate value representing which date that section belongs to.
The adapter (LocalItemListAdapter) was extended to handle this second type: it maps DATE_HEADER to a new view holder, inflates list_date_header_item.xml for it, and binds the date string. Also, the fragment (StatisticsPlaylistFragment) is where the actual logc is. When the sort mode is LAST_PLAYED, it processes the raw stream list and injects DateHeaderItem entries at the boundaries between different dates. MOST_PLAYED is left.
I hope I did not break anything though I build it 2 times and tested on my own device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant