Closed adbenitez closed 2 months ago
needs to be fixed in core or in jsonrpc, this is summaryPreviewImage
from ChatlistItem
same for webxdc apps probably.
in case things get more complex than expected, we can also consider to drop the image completely. it is of limited use in that size with distorted aspect, often saying not much more than that there is an image. and we meanwhile have an emoji to indicate better than the old text that an image is present.
I like the preview image, also I don't see why it should be complex
Can't reproduce this on my desktop, i see no image preview in case of a reaction. Also code-wise it looks correct, see thumbnail_path: None,
:
https://github.com/deltachat/deltachat-core-rust/blob/d6d90db957ee171365ca5dbd1f14b4440d843985/src/summary.rs#L64-L84
I think it's about when the last message in the chat is an image or webxdc and there is a newer reaction to any other message in the chat that came in after the image. Strange that the code doesn't seem to have that possibility. what desktop/core version did you use @adbenitez ?
i retried that:
images are fine, as @iequidoo pointed out. indeed, that is solved "proper" (and is no "hack" :)
the issue seems to be about webxdc-icons, which seems to be added later by jsonrpc or desktop somehow - and does not always fit to the summary therefore
i think, desktop must use only thumbnail_path
for the summary. core, additionally, can then set the path also for webxdc-icons as needed
the code in desktop: https://github.com/deltachat/deltachat-desktop/blob/83e44138e6d160f7cb5ae45c81f34bd85d0ba4d7/src/renderer/components/chat/ChatListItem.tsx#L104
webxdc icons are not set in code, because the path is inside of the zip files which is not accessible.
Maybe thumbnail path from jsonrpc/core should be set to sth like "webxdc-icon:last-msg-id" and then desktop should check for that string instead of checking for lastMessageType === 'Webxdc'
.
we could also make core directly return the paths that desktop needs, but that custom scheme (webxdc-icon:${accountId}.${msgId}
) is useless and maybe confusing for other platforms.
Maybe thumbnail path from jsonrpc/core should be set to sth like "webxdc-icon:last-msg-id" and then desktop should check for that string instead of checking for
lastMessageType === 'Webxdc'
.
Let's implement this approach. It looks as a minimal bugfix.
same for webxdc apps probably.
in case things get more complex than expected, we can also consider to drop the image completely. it is of limited use in that size with distorted aspect, often saying not much more than that there is an image. and we meanwhile have an emoji to indicate better than the old text that an image is present.
Hey, this pr fixes the distortion: https://github.com/deltachat/deltachat-desktop/pull/4064
this might be hard to fix without help from core, since these "foo reacted with X" summaries are kind of a minimal hack core-side