Skip to content

Fix inconsistent History page title when opening the History page from the sidebar.#13457

Open
TransZAllen wants to merge 1 commit intoTeamNewPipe:devfrom
TransZAllen:history_sort_mode
Open

Fix inconsistent History page title when opening the History page from the sidebar.#13457
TransZAllen wants to merge 1 commit intoTeamNewPipe:devfrom
TransZAllen:history_sort_mode

Conversation

@TransZAllen
Copy link
Copy Markdown
Contributor

@TransZAllen TransZAllen commented Apr 29, 2026

What is it?

  • [ ✔] Bugfix (user facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Add a helper method displaySortMode() to show the current sort mode in onResume(), instead of always resetting the top bar title to History
  • Move sort mode ↔ string resource mapping into StatisticSortMode: This avoids adding extra conditional branches, such as if-else or switch-case, in displaySortMode() when more sort modes are introduced in the future.

Before/After Screenshots/Screen Record

  • Before: The top title changes between page name "History" and current sort mode, remaining inconsistent every time the page is entered.
  • After: The History page title now always correctly reflects the current sort mode. Please see the screen recording after the fix:
enter_history_page_from_sidebar-after_fix-reduce_size.mp4

Fixes the following issue(s)

APK testing

Tested on device:

  • Enter History page from sidebar
  • Verify title reflects current sort mode
  • Toggle sort mode
  • Leave page and re-enter History
  • Confirm title remains consistent

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.

…idebar

When the History page was opened from the sidebar, onResume()
always reset the top bar title to "History", regardless of the
selected sort mode.
Now, show the current sort mode instead.
Also the sort mode to string resource mapping is moved into
StatisticSortMode, so new modes can be added without changing
displaySortMode().
@github-actions github-actions Bot added the size/small PRs with less than 50 changed lines label Apr 29, 2026
@ShareASmile ShareASmile added bug Issue is related to a bug history Anything to do with previously watched stuff GUI Issue is related to the graphical user interface labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug GUI Issue is related to the graphical user interface history Anything to do with previously watched stuff size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

History page title does not reflect current mode on first entry

2 participants