Disabled the disappearing message settings for the recipient of a message request as well

pull/559/head
Morgan Pretty 3 years ago
parent 4c89c165d8
commit 819d5a39e1

@ -363,7 +363,7 @@ CGFloat kIconViewLength = 24;
if (!self.thread.isGroupThread) { if (!self.thread.isGroupThread) {
TSContactThread *thread = (TSContactThread *)self.thread; TSContactThread *thread = (TSContactThread *)self.thread;
SNContact *contact = [LKStorage.shared getContactWithSessionID:thread.contactSessionID]; SNContact *contact = [LKStorage.shared getContactWithSessionID:thread.contactSessionID];
[switchView setEnabled:contact.didApproveMe]; [switchView setEnabled:(contact.isApproved && contact.didApproveMe)];
} }
UIStackView *topRow = UIStackView *topRow =
@ -437,6 +437,13 @@ CGFloat kIconViewLength = 24;
[slider autoPinEdge:ALEdgeLeading toEdge:ALEdgeLeading ofView:rowLabel]; [slider autoPinEdge:ALEdgeLeading toEdge:ALEdgeLeading ofView:rowLabel];
[slider autoPinTrailingToSuperviewMargin]; [slider autoPinTrailingToSuperviewMargin];
[slider autoPinBottomToSuperviewMargin]; [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; cell.userInteractionEnabled = !strongSelf.hasLeftGroup;

Loading…
Cancel
Save