linagora / twake-on-matrix

A multi-platform (Flutter) application for connecting to Matrix - an open network for secure, decentralized communication, with your favorite devices.
GNU Affero General Public License v3.0
64 stars 18 forks source link

TW-1806: fix image weird display on web #1866

Closed sherlockvn closed 5 months ago

sherlockvn commented 5 months ago

Issue: https://github.com/linagora/twake-on-matrix/issues/1806

Root cause:

When sending unsupported image format in web, it causes the image become blur and don't have data in image. Then, it will fallback to the errorWidget of Image.network widget => because errorWidget don't have width, so it make looks weird

Demo web, android

https://github.com/linagora/twake-on-matrix/assets/43041967/cfc167e4-7f04-4e3e-a4ed-42a75b90b584

Demo web, ios

https://github.com/linagora/twake-on-matrix/assets/43041967/1a5eecd0-cc3e-4bab-b523-d02362f94857

https://github.com/linagora/twake-on-matrix/assets/43041967/d3ccc707-8007-43bc-bc4b-820c00a9f523

https://github.com/linagora/twake-on-matrix/assets/43041967/17609361-9d12-4eb1-9e01-8662d25580dc

github-actions[bot] commented 5 months ago

This PR has been deployed to https://linagora.github.io/twake-on-matrix/1866

sherlockvn commented 5 months ago
hieutbui commented 5 months ago

I built and tested. It works well for:

Te-Z commented 5 months ago

LGTM, please rebase and squash

sherlockvn commented 5 months ago

Done

LGTM, please rebase and squash

sherlockvn commented 5 months ago

also i need to merge this one first: https://github.com/linagora/matrix-dart-sdk/pull/62

Te-Z commented 5 months ago

also i need to merge this one first: linagora/matrix-dart-sdk#62

done