mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Merge pull request #1044 from vector-im/feature/fix_big_image_rotation
Use exif info of the image for correct rotation.
This commit is contained in:
commit
3e8a0f7252
2 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,7 @@ Bugfix 🐛:
|
||||||
- Account creation: wrongly hints that an email can be used to create an account (#941)
|
- Account creation: wrongly hints that an email can be used to create an account (#941)
|
||||||
- Fix crash in the room directory, when public room has no name (#1023)
|
- Fix crash in the room directory, when public room has no name (#1023)
|
||||||
- Fix restoring keys backup with passphrase (#526)
|
- Fix restoring keys backup with passphrase (#526)
|
||||||
|
- Fix rotation of full-size image (#647)
|
||||||
- Fix joining rooms from directory via federation isn't working. (#808)
|
- Fix joining rooms from directory via federation isn't working. (#808)
|
||||||
- Leaving a room creates a stuck "leaving room" loading screen. (#1041)
|
- Leaving a room creates a stuck "leaving room" loading screen. (#1041)
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.bumptech.glide.load.engine.GlideException
|
||||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||||
import com.github.piasy.biv.view.BigImageView
|
import com.github.piasy.biv.view.BigImageView
|
||||||
import im.vector.matrix.android.api.session.content.ContentUrlResolver
|
import im.vector.matrix.android.api.session.content.ContentUrlResolver
|
||||||
import im.vector.matrix.android.internal.crypto.attachments.ElementToDecrypt
|
import im.vector.matrix.android.internal.crypto.attachments.ElementToDecrypt
|
||||||
|
@ -36,6 +37,7 @@ import im.vector.riotx.core.utils.DimensionConverter
|
||||||
import im.vector.riotx.core.utils.isLocalFile
|
import im.vector.riotx.core.utils.isLocalFile
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
|
@ -142,6 +144,12 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder:
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
imageView.setImageLoaderCallback(object: DefaultImageLoaderCallback {
|
||||||
|
override fun onSuccess(image: File?) {
|
||||||
|
imageView.ssiv.orientation = ORIENTATION_USE_EXIF
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
imageView.showImage(
|
imageView.showImage(
|
||||||
Uri.parse(thumbnail),
|
Uri.parse(thumbnail),
|
||||||
Uri.parse(fullSize)
|
Uri.parse(fullSize)
|
||||||
|
|
Loading…
Reference in a new issue