Scalable image preview for room avatars and profile images #474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey,
this PR adds scalable (/zoomable) previews of room avatars and profile images, similar to how it's already possible for normal images that are sent in chats.
The image viewer can be found when clicking on a profile image in the user bottom sheet or when tapping the room avatar in the chat details.
Concerning the implementation: I had the feeling that the preview would share too much code with the existing
ImageViewer
for Matrix events containing images, thus they're currently both using the same component.It'd be possible to create a new separate
ImageViewer
component only, but I'm not sure if the boilerplate code would be worth it.And sorry for all the reformatting caused by the changes, unfortunately that seems to be necessary for the CI to pass.