Reload image when the source is changed

This commit is contained in:
xmflsct 2023-01-10 19:36:42 +01:00
parent 8610be1caf
commit def4c5424e
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "tooot",
"version": "4.8.0",
"version": "4.8.1",
"description": "tooot for Mastodon",
"author": "xmflsct <me@xmflsct.com>",
"license": "GPL-3.0-or-later",

View File

@ -60,7 +60,10 @@ const GracefullyImage = ({
uri: reduceMotionEnabled && uri.static ? uri.static : currentUri
}
useEffect(() => {
if (currentUri !== uri.original && currentUri !== uri.remote) {
if (
(uri.original ? currentUri !== uri.original : true) &&
(uri.remote ? currentUri !== uri.remote : true)
) {
setCurrentUri(uri.original || uri.remote)
}
}, [currentUri, uri.original, uri.remote])