Disable attachments for non-friends

pull/570/head
Niels Andriesse 6 years ago
parent 8f0bd88ed4
commit a0e94d30fb

@ -59,6 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)setPlaceholderText:(NSString *)placeholderText;
- (void)clearTextMessageAnimated:(BOOL)isAnimated;
- (void)toggleDefaultKeyboard;
- (void)setAttachmentButtonHidden:(BOOL)isHidden;
- (void)updateFontSizes;

@ -362,6 +362,11 @@ const CGFloat kMaxTextViewHeight = 98;
[self.inputTextView reloadInputViews];
}
- (void)setAttachmentButtonHidden:(BOOL)isHidden
{
[self.attachmentButton setHidden:isHidden];
}
- (void)setQuotedReply:(nullable OWSQuotedReplyModel *)quotedReply
{
if (quotedReply == _quotedReply) {

@ -1646,6 +1646,8 @@ typedef enum : NSUInteger {
[self.inputToolbar setUserInteractionEnabled:!hasPendingFriendRequest];
NSString *placeholderText = hasPendingFriendRequest ? NSLocalizedString(@"Pending Friend Request...", "") : NSLocalizedString(@"New Message", "");
[self.inputToolbar setPlaceholderText:placeholderText];
BOOL isContactFriend = self.thread.isContactFriend;
[self.inputToolbar setAttachmentButtonHidden:!isContactFriend];
}
#pragma mark - Identity

Loading…
Cancel
Save