Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 7aae47b021
commit 96274a60a9

@ -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;

@ -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: %@";

Loading…
Cancel
Save