mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
fix: staggered grid cover being squashed for local source (#398)
* fix: cover ratio NaN for local source * unused * Update CHANGELOG.md
This commit is contained in:
parent
f035454150
commit
2b2e0491e8
2 changed files with 8 additions and 2 deletions
|
@ -26,7 +26,8 @@ The format is simplified version of [Keep a Changelog](https://keepachangelog.co
|
|||
- Fix certain Infinix devices being unable to use any "Open link in browser" actions, including tracker setup (@MajorTanya)
|
||||
- Fix source filter bottom sheet unable to be fully scrolled to the bottom
|
||||
- Prevent potential "Comparison method violates its general contract!" crash
|
||||
|
||||
- Fix staggered grid cover being squashed for local source
|
||||
|
||||
### Translation
|
||||
- Update translations from Weblate
|
||||
|
||||
|
|
|
@ -66,7 +66,12 @@ object MangaCoverMetadata {
|
|||
} else {
|
||||
options.inSampleSize = 4
|
||||
}
|
||||
val bitmap = BitmapFactory.decodeFile(file.filePath, options)
|
||||
val bitmap = try {
|
||||
val stream = file.openInputStream()
|
||||
BitmapFactory.decodeStream(stream, null, options)
|
||||
} catch (_: Throwable) {
|
||||
null
|
||||
}
|
||||
if (bitmap != null) {
|
||||
Palette.from(bitmap).generate { palette ->
|
||||
if (isInLibrary) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue