Duplicate cached thumbnails based on grid column width
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- mobile, performance
Research direction
Start in app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt, the location the issue identifies for overriding thumbnail request options. Reproduce with a clean cache, a grid column count that does not divide the screen width, then reverse the sort and compare cached thumbnail sizes. Done means the same grid size no longer creates duplicate cache entries differing by 1px; consider whether folder thumbnails show the same behavior.
Written by the indexing model from the issue text.
Description
Checklist
- I can reproduce the bug with the latest version given here.
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Affected app version
1.13.1
Affected Android/Custom ROM version
Android 16
Affected device model
Pixel 10 (emulated)
How did you install the app?
Built from source
Steps to reproduce the bug
- Start with a clean cache.
- In the media grid use a column count that is not divisible by screen width.
- Take note of the current cached thumbnails and their resolution.
- Sort the media grid in the opposite direction.
- Look at the cache again, new entries have been created that have a 1px difference in resolution.
Expected behavior
App does not cache thumbnails twice for the same grid size.
Actual behavior
When tiles move in the media grid from one column to another there is a chance it creates a new cache entry that has a 1px size difference. This depends on if the screen width is divisible by the column count.
For example a screen with a width of 1080px and a column count of 7 creates cached thumbnails with sizes 152px and 153px. If a tile then moves to a column with a different width a new thumbnail is created.
The problem can be more or less noticeable depending on the screen resolution.
By estimation, not actually tested each resolution:
| Resolution (vertical) | Appears with column count |
|---|---|
| 1080x2424 (Pixel 10) | 7... |
| 1440x3120 (S25 Ultra) | 7... |
| 1220×2656 (Xiaomi 17) | 3, 6, 7... |
Screenshots/Screen recordings
No response
Additional information
The problem likely appears for folder thumbnails too.
Potential fix could be to calculate what the thumbnail resolution should be when columns change and round the result. Then pass that as an override to RequestOptions in app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt
Tested with square thumbnails, no rounded corners, thumbnail spacing 1px.
Grid and tile padding affect thumbnail size too.
- Dominant language
- Kotlin
- Stars
- 3.8k
- Forks
- 270
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FossifyOrg/Gallery
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
FossifyOrg/Gallery#1235 ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FossifyOrg/Gallery#1215 · 1 comment ·
Maintainers usually reply within 1 day
-
"Fix Date Taken value" ignores OffsetTimeOriginalPossibly taken @PedroFlores199 claimed this 5 days ago. Openbug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FossifyOrg/Gallery#1213 · 3 comments ·
Maintainers usually reply within 1 day
-
App crashes if AccessMediaLocation permission is revokedMay be free again A pull request for this issue was closed without being merged. Openbug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
FossifyOrg/Gallery#1196 · 12 comments ·
Maintainers usually reply within 1 day
-
Renaming a locked folder silently removes its lockMay be free again A pull request for this issue was closed without being merged. Openbug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FossifyOrg/Gallery#1195 ·
Maintainers usually reply within 1 day
All issues in FossifyOrg/Gallery
Similar issues
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
grote/Transportr#1029 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
TeamAmaze/AmazeFileManager#4800 ·
Maintainers usually reply within 1 day
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsotto/sotto-authenticator#139 ·
Maintainers usually reply within 1 day
-
enhancement module:webview p3
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
NucleusFramework/Nucleus#1004 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
danielecanci/2ndCare#4 ·