From eadeb5e7354eef210c9d0e7075af7d4c5f1737bf Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 16 Feb 2024 15:53:01 +1100 Subject: [PATCH 1/2] fix: do not add timer update when for off for groupv1 --- ts/models/conversation.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index e6d84d3f9..5550981ae 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -870,7 +870,6 @@ export class ConversationModel extends Backbone.Model { ); // we don't add an update message when this comes from a config message, as we already have the SyncedMessage itself with the right timestamp to display - const shouldAddExpireUpdateMessage = !fromConfigMessage; if (this.isPublic()) { throw new Error("updateExpireTimer() Disappearing messages aren't supported in communities"); @@ -883,6 +882,13 @@ export class ConversationModel extends Backbone.Model { expirationMode = 'off'; expireTimer = 0; } + const shouldAddExpireUpdateMessage = + (this.isPrivate() && !fromConfigMessage) || + (this.isClosedGroup() && + !PubKey.isClosedGroupV3(this.id) && + !fromConfigMessage && + expirationMode !== this.get('expirationMode') && + expireTimer !== this.get('expireTimer')); // When we add a disappearing messages notification to the conversation, we want it // to be above the message that initiated that change, hence the subtraction. From 509a472d1ce53c3a3e5c633b8a7348bd0ab18848 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 16 Feb 2024 16:14:09 +1100 Subject: [PATCH 2/2] fix: address QA issues --- .../disappearing-messages/OverlayDisappearingMessages.tsx | 2 +- ts/models/conversation.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/components/conversation/right-panel/overlay/disappearing-messages/OverlayDisappearingMessages.tsx b/ts/components/conversation/right-panel/overlay/disappearing-messages/OverlayDisappearingMessages.tsx index 8c50402d7..f1ccaa440 100644 --- a/ts/components/conversation/right-panel/overlay/disappearing-messages/OverlayDisappearingMessages.tsx +++ b/ts/components/conversation/right-panel/overlay/disappearing-messages/OverlayDisappearingMessages.tsx @@ -28,7 +28,7 @@ const ButtonSpacer = styled.div` `; const StyledButtonContainer = styled.div` - background: linear-gradient(0deg, black, transparent); + background: linear-gradient(0deg, var(--background-primary-color), transparent); position: absolute; width: 100%; bottom: 0px; diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index 5550981ae..93b053402 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -888,7 +888,9 @@ export class ConversationModel extends Backbone.Model { !PubKey.isClosedGroupV3(this.id) && !fromConfigMessage && expirationMode !== this.get('expirationMode') && - expireTimer !== this.get('expireTimer')); + expireTimer !== this.get('expireTimer') && + expirationMode !== 'off' && + expireTimer !== 0); // When we add a disappearing messages notification to the conversation, we want it // to be above the message that initiated that change, hence the subtraction.