Left pane preview/timestamp: Further refine logic
This commit is contained in:
parent
bcd4f6407f
commit
8d5e832ed6
2 changed files with 9 additions and 9 deletions
|
@ -1884,11 +1884,6 @@
|
|||
}),
|
||||
]);
|
||||
|
||||
// This is the less-restrictive of these two fetches; if it's falsey, both will be
|
||||
if (!previewMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
this.hasDraft() &&
|
||||
this.get('draftTimestamp') &&
|
||||
|
@ -1903,10 +1898,15 @@
|
|||
: currentTimestamp;
|
||||
|
||||
this.set({
|
||||
lastMessage: previewMessage.getNotificationText() || '',
|
||||
lastMessageStatus: previewMessage.getMessagePropStatus() || null,
|
||||
lastMessage:
|
||||
(previewMessage ? previewMessage.getNotificationText() : '') || '',
|
||||
lastMessageStatus:
|
||||
(previewMessage ? previewMessage.getMessagePropStatus() : null) ||
|
||||
null,
|
||||
timestamp,
|
||||
lastMessageDeletedForEveryone: previewMessage.deletedForEveryone,
|
||||
lastMessageDeletedForEveryone: previewMessage
|
||||
? previewMessage.deletedForEveryone
|
||||
: false,
|
||||
});
|
||||
|
||||
window.Signal.Data.updateConversation(this.attributes);
|
||||
|
|
|
@ -2759,7 +2759,7 @@ async function getLastConversationActivity(
|
|||
const row = await db.get(
|
||||
`SELECT * FROM messages WHERE
|
||||
conversationId = $conversationId AND
|
||||
(type IS NULL OR type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced')) AND
|
||||
(type IS NULL OR type NOT IN ('profile-change', 'verified-change', 'message-history-unsynced', 'keychange')) AND
|
||||
(json_extract(json, '$.expirationTimerUpdate.fromSync') IS NULL OR json_extract(json, '$.expirationTimerUpdate.fromSync') != 1)
|
||||
ORDER BY received_at DESC
|
||||
LIMIT 1;`,
|
||||
|
|
Loading…
Reference in a new issue