adding some GIF and SVG improvements

This commit is contained in:
tibbi 2021-03-07 22:43:06 +01:00
parent b51a4d14cc
commit 8b735f36d7

View file

@ -374,8 +374,10 @@ class PhotoFragment : ViewPagerFragment() {
mView.apply { mView.apply {
gestures_view.beGone() gestures_view.beGone()
gif_view.setInputSource(source)
gif_view_frame.beVisible() gif_view_frame.beVisible()
ensureBackgroundThread {
gif_view.setInputSource(source)
}
} }
} catch (e: Exception) { } catch (e: Exception) {
loadBitmap() loadBitmap()
@ -385,11 +387,13 @@ class PhotoFragment : ViewPagerFragment() {
} }
private fun loadSVG() { private fun loadSVG() {
Glide.with(context!!) if (context != null) {
.`as`(PictureDrawable::class.java) Glide.with(context!!)
.listener(SvgSoftwareLayerSetter()) .`as`(PictureDrawable::class.java)
.load(mMedium.path) .listener(SvgSoftwareLayerSetter())
.into(mView.gestures_view) .load(mMedium.path)
.into(mView.gestures_view)
}
} }
private fun loadBitmap(addZoomableView: Boolean = true) { private fun loadBitmap(addZoomableView: Boolean = true) {