Use in-memory thumbnail APIs when possible (#3817)
* Use in-memory thumbnail APIs when possible * Make an exception for animated image types. Also add `TimelineItemImageContent.thumbnailMediaRequestData` lazy property. * Try simplifying the logic a bit more.
This commit is contained in:
parent
bee708cf3e
commit
2873a6829b
12 changed files with 62 additions and 19 deletions
|
|
@ -37,7 +37,7 @@ class RustMediaLoader(
|
|||
withContext(mediaDispatcher) {
|
||||
runCatching {
|
||||
source.toRustMediaSource().use { source ->
|
||||
innerClient.getMediaContent(source).toUByteArray().toByteArray()
|
||||
innerClient.getMediaContent(source)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ class RustMediaLoader(
|
|||
mediaSource = mediaSource,
|
||||
width = width.toULong(),
|
||||
height = height.toULong()
|
||||
).toUByteArray().toByteArray()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue