From 819d5a39e19fab390e8c0131829424d9eb376087 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Thu, 24 Feb 2022 16:29:06 +1100 Subject: [PATCH] Disabled the disappearing message settings for the recipient of a message request as well --- .../Settings/OWSConversationSettingsViewController.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Session/Conversations/Settings/OWSConversationSettingsViewController.m b/Session/Conversations/Settings/OWSConversationSettingsViewController.m index 1d20ad071..5585b155d 100644 --- a/Session/Conversations/Settings/OWSConversationSettingsViewController.m +++ b/Session/Conversations/Settings/OWSConversationSettingsViewController.m @@ -363,7 +363,7 @@ CGFloat kIconViewLength = 24; if (!self.thread.isGroupThread) { TSContactThread *thread = (TSContactThread *)self.thread; SNContact *contact = [LKStorage.shared getContactWithSessionID:thread.contactSessionID]; - [switchView setEnabled:contact.didApproveMe]; + [switchView setEnabled:(contact.isApproved && contact.didApproveMe)]; } UIStackView *topRow = @@ -437,6 +437,13 @@ CGFloat kIconViewLength = 24; [slider autoPinEdge:ALEdgeLeading toEdge:ALEdgeLeading ofView:rowLabel]; [slider autoPinTrailingToSuperviewMargin]; [slider autoPinBottomToSuperviewMargin]; + + // Disable Disappearing Messages slider if the conversation hasn't been approved (just in case) + if (!self.thread.isGroupThread) { + TSContactThread *thread = (TSContactThread *)self.thread; + SNContact *contact = [LKStorage.shared getContactWithSessionID:thread.contactSessionID]; + [slider setEnabled:(contact.isApproved && contact.didApproveMe)]; + } cell.userInteractionEnabled = !strongSelf.hasLeftGroup;