Skip to content

fix: respect square thumbnail style in list view#1085

Open
MiMoHo wants to merge 1 commit into
FossifyOrg:mainfrom
MiMoHo:fix/issue-589
Open

fix: respect square thumbnail style in list view#1085
MiMoHo wants to merge 1 commit into
FossifyOrg:mainfrom
MiMoHo:fix/issue-589

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 3, 2026

Copy link
Copy Markdown

Type of change(s)

  • Bug fix

What changed and why

List-view thumbnails always rendered with rounded corners even when the user selected the square thumbnail style, while grid view respected the setting. In both MediaAdapter and DirectoryAdapter, the roundedCorners when evaluated the isListViewType branch first, so list view unconditionally forced ROUNDED_CORNERS_SMALL and never consulted the square setting (config.fileRoundedCorners == false for media, folderStyle == FOLDER_STYLE_SQUARE for folders).

The fix reorders the branches so the square-style check runs first. When the user picks square, thumbnails now get ROUNDED_CORNERS_NONE in both list and grid views; otherwise the previous behavior is preserved (list = small radius, grid = big radius). This is a minimal, behavior-preserving reorder with no layout or resource changes.

Tests performed

Built the fossDebug variant and verified on an Android 15 (API 35) emulator:

Seeded 5 images; set File thumbnail style=Square (rounded off), switched folder to List view -> thumbnails square-cornered; changed style to Rounded corners -> List view thumbnails rounded. Style now respected in list view. Folder thumbnails also square in grid (Folder style=Square).

Also confirmed detekt, lint, unit tests and the build all pass locally (CI-equivalent).

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator.
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

Coded with Opus 4.8 ultracode.

List-view thumbnails always applied ROUNDED_CORNERS_SMALL because the isListViewType branch was evaluated before the square-style check in MediaAdapter and DirectoryAdapter. Reorder the when-branches so the square setting (fileRoundedCorners == false / FOLDER_STYLE_SQUARE) is checked first, giving square thumbnails no rounding in both list and grid views while preserving rounded corners otherwise.
@MiMoHo MiMoHo requested a review from naveensingh as a code owner July 3, 2026 21:29
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.

Thumbnails in list view mode have rounded corners when they are set to square

1 participant