From 96274a60a9bc69b2bcbb9fb1ccce4149c8a2026a Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 16 Nov 2017 16:43:41 -0500 Subject: [PATCH] Respond to CR. // FREEBIE --- .../ConversationViewController.m | 24 +++++-------------- .../translations/en.lproj/Localizable.strings | 9 +++---- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 458941d70..bfdb3ae44 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -208,7 +208,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { @property (nonatomic, nullable) ThreadDynamicInteractions *dynamicInteractions; @property (nonatomic) BOOL hasClearedUnreadMessagesIndicator; @property (nonatomic) BOOL showLoadMoreHeader; -@property (nonatomic) UIButton *loadMoreHeader; +@property (nonatomic) UILabel *loadMoreHeader; @property (nonatomic) uint64_t lastVisibleTimestamp; @property (nonatomic, readonly) BOOL isGroupConversation; @@ -512,13 +512,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { [self.inputToolbar autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.collectionView]; [self autoPinViewToBottomGuideOrKeyboard:self.inputToolbar]; - self.loadMoreHeader = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.loadMoreHeader setTitle:NSLocalizedString(@"load_earlier_messages", @"") forState:UIControlStateNormal]; - [self.loadMoreHeader setTitleColor:[UIColor ows_materialBlueColor] forState:UIControlStateNormal]; - self.loadMoreHeader.titleLabel.font = [UIFont ows_mediumFontWithSize:16.f]; - [self.loadMoreHeader addTarget:self - action:@selector(loadMoreHeaderTapped:) - forControlEvents:UIControlEventTouchUpInside]; + self.loadMoreHeader = [UILabel new]; + self.loadMoreHeader.text = NSLocalizedString(@"CONVERSATION_VIEW_LOADING_MORE_MESSAGES", + @"Indicates that the app is loading more messages in this conversation."); + self.loadMoreHeader.textColor = [UIColor ows_materialBlueColor]; + self.loadMoreHeader.font = [UIFont ows_mediumFontWithSize:16.f]; [self.collectionView addSubview:self.loadMoreHeader]; [self.loadMoreHeader autoPinWidthToWidthOfView:self.view]; [self.loadMoreHeader autoPinEdgeToSuperviewEdge:ALEdgeTop]; @@ -1460,16 +1458,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { } } -- (void)loadMoreHeaderTapped:(id)sender -{ - if (self.isUserScrolling) { - DDLogError(@"%@ Ignoring load more tap while user is scrolling.", self.logTag); - return; - } - - [self loadMoreMessages]; -} - - (void)loadMoreMessages { BOOL hasEarlierUnseenMessages = self.dynamicInteractions.hasMoreUnseenMessages; diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 6783adb7c..bdf1f82a1 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -394,6 +394,9 @@ /* Title for the group of buttons show for unknown contacts offering to add them to contacts, etc. */ "CONVERSATION_VIEW_CONTACTS_OFFER_TITLE" = "This user is not in your contacts."; +/* Indicates that the app is loading more messages in this conversation. */ +"CONVERSATION_VIEW_LOADING_MORE_MESSAGES" = "Loading More Messages..."; + /* Indicator on truncated text messages that they can be tapped to see the entire text message. */ "CONVERSATION_VIEW_OVERSIZE_TEXT_TAP_FOR_MORE" = "Tap For More"; @@ -817,9 +820,6 @@ /* table cell label in conversation settings */ "LIST_GROUP_MEMBERS_ACTION" = "Group Members"; -/* No comment provided by engineer. */ -"load_earlier_messages" = "Load Earlier Messages"; - /* No comment provided by engineer. */ "LOGGING_SECTION" = "Logging"; @@ -1081,9 +1081,6 @@ /* A display format for oversize text messages. */ "OVERSIZE_TEXT_DISPLAY_FORMAT" = "%@…"; -/* The title of the 'oversize text message' view. */ -"OVERSIZE_TEXT_MESSAGE_VIEW_TITLE" = "Message"; - /* A format for a label showing an example phone number. Embeds {{the example phone number}}. */ "PHONE_NUMBER_EXAMPLE_FORMAT" = "Example: %@";