Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitAuto: Hide hidden categories from history #767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gitauto-ai[bot]
Copy link

@gitauto-ai gitauto-ai bot commented Mar 14, 2025

Resolves #762

Why is this feature needed?

Currently, while users can hide entire categories in the library, entries from these hidden categories still appear in the history tab. This creates a discrepancy between what users see in their library versus the history view, potentially exposing content that the user has intentionally hidden.

What and how are we changing? Why this approach?

We're modifying the SQL query that generates the history view. The change adds a WHERE clause that checks whether the manga associated with a history entry is linked to any hidden category. If it is, that entry is excluded from the results. This approach leverages existing category configuration (the "hidden" flag) to ensure consistency across different parts of the app.

What actions are required from users?

No explicit actions are needed from users. Once the update is applied, the history tab will automatically filter out entries from hidden categories. Users should verify that their hidden categories are properly configured in the library settings.

How does it work? (Technical details)

The SQL query is updated in the file:

  • data/src/main/sqldelight/tachiyomi/view/historyView.sq

Specifically, after joining the necessary tables for chapters and history, a WHERE NOT EXISTS clause was added. This clause queries the mangas_categories and categories tables to check if the related manga is assigned to any category marked as hidden (c.hidden = 1). If such an entry exists, the manga will be filtered from the history results.

Is it backwards compatible?

Yes, the change is backwards compatible. It only affects the display of history entries by excluding those that belong to hidden categories. If a manga is not part of any hidden category, its history will display as before. Users who do not use the hidden category feature will see no changes.

Any other considerations?

  • Further testing should be carried out to ensure that the new condition does not inadvertently hide entries that should be visible.
  • Consideration for future enhancements: additional filtering criteria might be implemented for other user-defined categories or display preferences.
  • This update continues the effort to provide a consistent user experience between the library and the history view.
git fetch origin
git checkout gitauto/issue-762-20250314-085518
git pull origin gitauto/issue-762-20250314-085518

@gitauto-ai gitauto-ai bot requested a review from cuong-tran March 14, 2025 09:00
@gitauto-ai gitauto-ai bot mentioned this pull request Mar 14, 2025
4 tasks
Copy link

sourcery-ai bot commented Mar 14, 2025

🧙 Sourcery has finished reviewing your pull request!


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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, gitauto-ai[bot]!). We assume it knows what it's doing!

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.

Hide hidden categories from history
0 participants