Fixes for scrolling in conversation view.
This commit is contained in:
parent
b6ca9a8cef
commit
87b0692af0
|
@ -973,6 +973,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (self.isIncoming) {
|
||||
return NO;
|
||||
}
|
||||
if (self.cellType == OWSMessageCellType_DownloadingAttachment) {
|
||||
return NO;
|
||||
}
|
||||
if (!self.attachmentStream) {
|
||||
return NO;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (void)didPasteAttachment:(SignalAttachment *_Nullable)attachment;
|
||||
|
||||
- (void)inputTextViewDidBecomeFirstResponder;
|
||||
|
||||
- (void)inputTextViewSendMessagePressed;
|
||||
|
||||
@end
|
||||
|
|
|
@ -129,16 +129,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)becomeFirstResponder
|
||||
{
|
||||
BOOL becameFirstResponder = [super becomeFirstResponder];
|
||||
if (becameFirstResponder) {
|
||||
// Intercept to scroll to bottom when text view is tapped.
|
||||
[self.inputTextViewDelegate inputTextViewDidBecomeFirstResponder];
|
||||
}
|
||||
return becameFirstResponder;
|
||||
}
|
||||
|
||||
- (BOOL)pasteboardHasPossibleAttachment
|
||||
{
|
||||
// We don't want to load/convert images more than once so we
|
||||
|
|
|
@ -3507,13 +3507,6 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
|
||||
#pragma mark - ConversationInputTextViewDelegate
|
||||
|
||||
- (void)inputTextViewDidBecomeFirstResponder
|
||||
{
|
||||
OWSAssert([NSThread isMainThread]);
|
||||
|
||||
[self scrollToBottomAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)inputTextViewSendMessagePressed
|
||||
{
|
||||
[self sendButtonPressed];
|
||||
|
@ -3632,7 +3625,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
|||
[self updateLastVisibleTimestamp];
|
||||
[self autoLoadMoreIfNecessary];
|
||||
|
||||
if ([self isScrolledAwayFromBottom]) {
|
||||
if (self.isUserScrolling && [self isScrolledAwayFromBottom]) {
|
||||
[self.inputToolbar endEditingTextMessage];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue