Skip to content

Commit

Permalink
fix: chatlist image thumbnails not showing on Win
Browse files Browse the repository at this point in the history
The `url()` wants a string, so let's give it a string.
Otherwise it treats backwards slashes, which used in Windows paths,
as escape characters, which results in an invalid URL.

The bug was introduced in 72bb581,
then there was a fix for something in 87ba793.

Though it feels like there should be a proper way to convert file
paths to URL...
  • Loading branch information
WofWca committed Sep 17, 2024
1 parent c771c5d commit 0f45c16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- security: harden electron_functions, only runtime can use them now
- security: harden runtime interface by deleting the reference on window (`window.r`) after the first use. For development it is now accessible at `exp.runtime` but only in `--devmode` like `exp.rpc`
- dev: update `./bin/update_background_thumbnails.sh` script
- fix chatlist image thumbnails #4101
- fix chatlist image thumbnails #4101, #4139
- fix: spacing around avatars in reaction details dialog #4114
- fix: wrong translation string for new group creation #4126
- fix: packaging: windows 64bit and 32bit releases now have different filenames, bring back 64bit windows releases. #4131
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/components/chat/ChatListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ function Message({
{summaryPreviewImage && !iswebxdc && (
<div
className='summary_thumbnail'
style={{ backgroundImage: `url("${summaryPreviewImage}")` }}
style={{
backgroundImage: `url(${JSON.stringify(summaryPreviewImage)})`,
}}
/>
)}
{iswebxdc && lastMessageId && (
Expand Down

0 comments on commit 0f45c16

Please sign in to comment.