Skip to content

Add batch selection actions for gallery lists - #3008

Open
Vivitoto wants to merge 1 commit into
FooIbar:mainfrom
Vivitoto:feat/batch-gallery-actions
Open

Vivitoto wants to merge 1 commit into
FooIbar:mainfrom
Vivitoto:feat/batch-gallery-actions

Conversation

@Vivitoto

Copy link
Copy Markdown

Summary

This PR adds an opt-in batch selection mode to gallery lists.

It supports:

  • selecting/deselecting loaded gallery items
  • selecting all currently loaded items
  • batch favorite with one favorite slot selection
  • batch unfavorite with confirmation
  • copying torrent magnet links for selected galleries

When multiple torrents are available for one gallery, the selected torrent can be chosen by:

  • largest size
  • latest time

The chosen magnet links are copied to the clipboard as newline-separated text.

Behavior

Existing gallery item behavior is preserved:

  • normal tap still opens/navigates to the gallery
  • normal long press still opens the existing single-gallery action menu

Batch mode is only enabled explicitly from:

  • the top bar batch selection action
  • the existing single-gallery action menu

In batch mode, tapping a gallery toggles its selected state.

UI

Batch mode uses the existing selectable item overlay style.

For gallery lists, the selection indicator reserves a stable top-right area while batch mode is active. Unselected items show an outline indicator, and selected items show a checked indicator. This avoids layout shifts and keeps long titles from colliding with the selected state indicator.

Notes

"Select all" only selects currently loaded paging items.

Batch favorite/unfavorite operations are processed sequentially to avoid firing many requests at once.

Test plan

Passed on fork CI:

  • check
  • default
  • marshmallow

CI run:
https://github.com/Vivitoto/EhViewer/actions/runs/34434538759

A pre-release APK build for manual testing is available here:
https://github.com/Vivitoto/EhViewer/releases/tag/batch-gallery-actions-3d07b1e

@Vivitoto
Vivitoto force-pushed the feat/batch-gallery-actions branch from dc39e07 to 8c19832 Compare September 10, 2026 04:20
@revonateB0T

Copy link
Copy Markdown
Collaborator

@Vivitoto Hi! Thanks for the PR, could you please split the torrent-related logic into a separate PR so we can review it first? The GalleryListScreen UI needs to be discussed, if we decided to add multi-selection, the long-press dialog would become unnecessary, should consider moving the "Read" button somewhere else.

@Vivitoto
Vivitoto force-pushed the feat/batch-gallery-actions branch from 8c19832 to 2516c52 Compare September 10, 2026 05:13
@Vivitoto

Copy link
Copy Markdown
Author

Thanks for the feedback. I split the torrent-related refactor into a separate smaller PR first: #3009.

For this PR, I will keep the gallery-list multi-selection UI discussion separate and will not add more torrent behavior here.

@Vivitoto
Vivitoto force-pushed the feat/batch-gallery-actions branch from 2516c52 to b2d3da6 Compare September 10, 2026 10:01
@Vivitoto
Vivitoto force-pushed the feat/batch-gallery-actions branch from b2d3da6 to 99e790e Compare September 10, 2026 14:59
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.

2 participants