Skip to content

feat: Added an Autohide hidden categories feature on App Restart#1647

Open
KenzKD wants to merge 5 commits into
komikku-app:masterfrom
KenzKD:Autohide-Hidden-Categories
Open

feat: Added an Autohide hidden categories feature on App Restart#1647
KenzKD wants to merge 5 commits into
komikku-app:masterfrom
KenzKD:Autohide-Hidden-Categories

Conversation

@KenzKD

@KenzKD KenzKD commented May 17, 2026

Copy link
Copy Markdown

Close #597

Auto hides the "Show hidden categories" from the "Display" options on app restart.

I have also added a toggle in the advanced setting panel under the Library section to disable this feature in case someone does not want it.

Add a 👍 reaction to pull requests you find important.

Summary by Sourcery

Add a configurable option to automatically hide hidden categories on app startup.

New Features:

  • Introduce an "Autohide hidden categories" toggle in Advanced Library settings.
  • Automatically clear the "Show hidden categories" display option on app launch when the autohide setting is enabled.

Enhancements:

  • Persist the autohide hidden categories preference in UI preferences for use at startup behavior.

@sourcery-ai

sourcery-ai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Implements an auto-hide behavior for the "Show hidden categories" display option on app startup, controlled by a new advanced-setting toggle stored in UI preferences, and wires it into app initialization and localization strings.

Sequence diagram for autohide hidden categories on app startup

sequenceDiagram
    participant App
    participant UiPreferences
    participant LibraryPreferences

    App->>UiPreferences: autoHideHiddenCategories()
    UiPreferences-->>App: PreferenceBoolean
    App->>UiPreferences: autoHideHiddenCategories().get()
    UiPreferences-->>App: Boolean
    alt [autoHideHiddenCategories is true]
        App->>LibraryPreferences: showHiddenCategories()
        LibraryPreferences-->>App: PreferenceBoolean
        App->>LibraryPreferences: showHiddenCategories().set(false)
    end
Loading

File-Level Changes

Change Details Files
Add app-startup logic to automatically disable showing hidden categories based on a user preference.
  • Inject UiPreferences and LibraryPreferences into the Application class via dependency injection.
  • On application create, check the new autoHideHiddenCategories UI preference and, when enabled, programmatically set the library "show hidden categories" preference to false.
app/src/main/java/eu/kanade/tachiyomi/App.kt
Expose a new UI preference to control the auto-hide hidden categories feature.
  • Add a boolean preference accessor autoHideHiddenCategories with default true to UiPreferences.
app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt
Add an Advanced Settings toggle for the auto-hide hidden categories behavior.
  • Insert a new SwitchPreference under the Library section in Advanced settings bound to the autoHideHiddenCategories preference.
  • Use localized title and subtitle strings to describe the new toggle and its behavior.
app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
i18n-kmk/src/commonMain/moko-resources/base/strings.xml

Assessment against linked issues

Issue Objective Addressed Explanation
#597 On app restart, automatically reset the "Show hidden categories" display option so that hidden categories are hidden again (i.e., the filter does not persist between sessions).

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In App.kt, consider simplifying the boolean check and matching existing style, e.g. if (uiPreferences.autoHideHiddenCategories().get()) { ... } with the opening brace on the same line as the if.
  • The logic that mutates libraryPreferences.showHiddenCategories() on every app startup might be better colocated closer to the library/display feature itself rather than in App, to keep application bootstrapping free of feature-specific side effects.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `App.kt`, consider simplifying the boolean check and matching existing style, e.g. `if (uiPreferences.autoHideHiddenCategories().get()) { ... }` with the opening brace on the same line as the `if`.
- The logic that mutates `libraryPreferences.showHiddenCategories()` on every app startup might be better colocated closer to the library/display feature itself rather than in `App`, to keep application bootstrapping free of feature-specific side effects.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new user experience enhancement that automatically resets the 'Show hidden categories' display option to its hidden state when the application restarts. This provides a cleaner default library view for users who prefer not to see hidden categories by default. A corresponding preference has been added to the advanced settings, giving users full control to disable this automatic behavior if they wish.

Highlights

  • New Feature: Autohide Hidden Categories: Implemented a feature to automatically hide the 'Show hidden categories' option from the display settings upon application restart, ensuring a consistent default view.
  • User Preference Toggle: Added a new toggle in the Advanced Settings panel under the Library section, allowing users to enable or disable the autohide functionality for hidden categories.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


Hidden views now fade, On restart, fresh and clean, Settings hold the key.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new feature to automatically hide hidden categories upon app startup. Changes include adding a new preference to UiPreferences, a corresponding switch in the Advanced settings screen, and the logic implementation within the App class. The review feedback focuses on improving code consistency and adherence to style standards, specifically by removing redundant boolean comparisons, adopting Egyptian brace styling, adding trailing commas, and correcting string resource casing and escaping.

Comment thread app/src/main/java/eu/kanade/tachiyomi/App.kt Outdated
Comment thread i18n-kmk/src/commonMain/moko-resources/base/strings.xml Outdated
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.

Hidden Categories every restart app

1 participant