From d29202bfffe8f08087d6e7a8fb4f7f988db96e4a Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 18 Nov 2019 14:32:35 +1100 Subject: [PATCH] Remove unused code --- .../ConversationView/ConversationInputToolbar.m | 12 ------------ .../ConversationView/ConversationViewController.m | 6 +++--- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m index 075c133b3..434a07316 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationInputToolbar.m @@ -1107,12 +1107,6 @@ const CGFloat kMaxTextViewHeight = 98; [self.mentionCandidateSelectionView setPublicChatChannel:publicChat.channel]; } self.mentionCandidateSelectionView.mentionCandidates = mentionCandidates; - // Add animation -// [UIView animateWithDuration:0.5f animations:^{ -// self.mentionCandidateSelectionViewSizeConstraint.constant = 6 + MIN(mentionCandidates.count, 4) * 52; -// [self setNeedsLayout]; -// [self layoutIfNeeded]; -// }]; self.mentionCandidateSelectionViewSizeConstraint.constant = 6 + MIN(mentionCandidates.count, 4) * 52; [self setNeedsLayout]; [self layoutIfNeeded]; @@ -1121,12 +1115,6 @@ const CGFloat kMaxTextViewHeight = 98; - (void)hideMentionCandidateSelectionView { - // Add animation -// [UIView animateWithDuration:0.5f animations:^{ -// self.mentionCandidateSelectionViewSizeConstraint.constant = 0; -// [self setNeedsLayout]; -// [self layoutIfNeeded]; -// }]; self.mentionCandidateSelectionViewSizeConstraint.constant = 0; [self setNeedsLayout]; [self layoutIfNeeded]; diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 4632f5b9a..3fc99a19c 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3826,11 +3826,11 @@ typedef enum : NSUInteger { NSUInteger lastCharacterIndex = newText.length - 1; unichar lastCharacter = [newText characterAtIndex:lastCharacterIndex]; // Check if there is a whitespace before '@' or the '@' is the first character - unichar secondLastCharacter = ' '; + unichar secondToLastCharacter = ' '; if (lastCharacterIndex > 0) { - secondLastCharacter = [newText characterAtIndex:lastCharacterIndex - 1]; + secondToLastCharacter = [newText characterAtIndex:lastCharacterIndex - 1]; } - if (lastCharacter == '@' && [NSCharacterSet.whitespaceAndNewlineCharacterSet characterIsMember:secondLastCharacter]) { + if (lastCharacter == '@' && [NSCharacterSet.whitespaceAndNewlineCharacterSet characterIsMember:secondToLastCharacter]) { NSArray *mentionCandidates = [LKAPI getMentionCandidatesFor:@"" in:self.thread.uniqueId]; self.currentMentionStartIndex = (NSInteger)lastCharacterIndex; [self.inputToolbar showMentionCandidateSelectionViewFor:mentionCandidates in:self.thread];