Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Icon preview of latest WebXDC displayed when summary is reaction event #4062

Merged
merged 7 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [Unreleased][unreleased]
- Fixed Icon preview of latest WebXDC displayed when summary is reaction event #4062

### Added
- New keyboard shortcuts (experimental setting): Telegram-style Ctrl+Up/Down to select the message to reply to #3965
Expand Down
7 changes: 2 additions & 5 deletions src/renderer/components/chat/ChatListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function Message({
isArchived,
isContactRequest,
summaryPreviewImage,
lastMessageType,
lastMessageId,
}: Pick<
ChatListItemType,
Expand All @@ -77,7 +76,6 @@ function Message({
| 'isArchived'
| 'isContactRequest'
| 'summaryPreviewImage'
| 'lastMessageType'
| `lastMessageId`
>) {
const wasReceived =
Expand All @@ -87,7 +85,7 @@ function Message({

const status = wasReceived ? '' : mapCoreMsgStatus2String(summaryStatus)

const iswebxdc = lastMessageType === 'Webxdc'
const iswebxdc = summaryPreviewImage === 'webxdc-icon://last-msg-id'

return (
<div className='chat-list-item-message'>
Expand All @@ -101,7 +99,7 @@ function Message({
{summaryText1 + ': '}
</div>
)}
{summaryPreviewImage && (
{summaryPreviewImage && !iswebxdc && (
<img className='summary_thumbnail' src={summaryPreviewImage} />
)}
{iswebxdc && lastMessageId && (
Expand Down Expand Up @@ -281,7 +279,6 @@ function ChatListItemNormal({
freshMessageCounter={chatListItem.freshMessageCounter}
isArchived={chatListItem.isArchived}
isContactRequest={chatListItem.isContactRequest}
lastMessageType={chatListItem.lastMessageType}
lastMessageId={chatListItem.lastMessageId}
/>
</div>
Expand Down
Loading