mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44: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,6 +26,7 @@ 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 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
|
- Fix source filter bottom sheet unable to be fully scrolled to the bottom
|
||||||
- Prevent potential "Comparison method violates its general contract!" crash
|
- Prevent potential "Comparison method violates its general contract!" crash
|
||||||
|
- Fix staggered grid cover being squashed for local source
|
||||||
|
|
||||||
### Translation
|
### Translation
|
||||||
- Update translations from Weblate
|
- Update translations from Weblate
|
||||||
|
|
|
@ -66,7 +66,12 @@ object MangaCoverMetadata {
|
||||||
} else {
|
} else {
|
||||||
options.inSampleSize = 4
|
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) {
|
if (bitmap != null) {
|
||||||
Palette.from(bitmap).generate { palette ->
|
Palette.from(bitmap).generate { palette ->
|
||||||
if (isInLibrary) {
|
if (isInLibrary) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue