Sort by inbox position to match phone after link

This commit is contained in:
Josh Perez
2020-03-09 17:43:09 -07:00
committed by Scott Nonnenberg
parent 1f5cb9e8af
commit 4830213a12
25 changed files with 707 additions and 1029 deletions

View File

@@ -26,13 +26,16 @@ export const createLastMessageUpdate = ({
}
const { type, expirationTimerUpdate } = lastMessage;
const isMessageHistoryUnsynced = type === 'message-history-unsynced';
const isVerifiedChangeMessage = type === 'verified-change';
const isExpireTimerUpdateFromSync = Boolean(
expirationTimerUpdate && expirationTimerUpdate.fromSync
);
const shouldUpdateTimestamp = Boolean(
!isVerifiedChangeMessage && !isExpireTimerUpdateFromSync
!isMessageHistoryUnsynced &&
!isVerifiedChangeMessage &&
!isExpireTimerUpdateFromSync
);
const newTimestamp = shouldUpdateTimestamp
? lastMessage.sent_at