mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 08:12:46 +02:00
Compare commits
6 Commits
v1.6.0
...
feature/fi
Author | SHA1 | Date | |
---|---|---|---|
|
6c91fa54e7 | ||
|
526320f4e3 | ||
|
5c67b3b216 | ||
|
d03521d153 | ||
|
d520f7a5d4 | ||
|
cfe7852ffd |
@@ -8,6 +8,8 @@ Improvements 🙌:
|
||||
- Add System theme option and set as default (#904) (#2387)
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix Canvas: trying to draw too large bitmap (#1951)
|
||||
- Url previews sometimes attached to wrong message (#2561)
|
||||
- Unspecced msgType field in m.sticker (#2580)
|
||||
- Wait for all room members to be known before sending a message to a e2e room (#2518)
|
||||
- Url previews sometimes attached to wrong message (#2561)
|
||||
|
@@ -30,6 +30,7 @@ import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.target.CustomViewTarget
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||
import com.github.chrisbanes.photoview.PhotoView
|
||||
import com.github.piasy.biv.view.BigImageView
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
@@ -152,7 +153,11 @@ class ImageContentRenderer @Inject constructor(private val activeSessionHolder:
|
||||
.load(resolvedUrl)
|
||||
}
|
||||
|
||||
req.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
|
||||
val maximumScale = (contextView as? PhotoView)?.maximumScale?.toInt() ?: 1
|
||||
val width = min(contextView.resources.displayMetrics.widthPixels, data.width ?: 0).times(maximumScale)
|
||||
val height = min(contextView.resources.displayMetrics.heightPixels, data.height ?: 0).times(maximumScale)
|
||||
|
||||
req.override(width, height)
|
||||
.fitCenter()
|
||||
.into(target)
|
||||
}
|
||||
|
@@ -52,8 +52,8 @@ class RoomEventsAttachmentProvider(
|
||||
elementToDecrypt = content.encryptedFileInfo?.toElementToDecrypt(),
|
||||
maxHeight = -1,
|
||||
maxWidth = -1,
|
||||
width = null,
|
||||
height = null,
|
||||
width = content.info?.width,
|
||||
height = content.info?.height,
|
||||
allowNonMxcUrls = it.root.sendState.isSending()
|
||||
|
||||
)
|
||||
|
Reference in New Issue
Block a user