mirror of
https://github.com/zhigang1992/MessagesTableViewController.git
synced 2026-04-30 05:05:01 +08:00
Revert "Revert "Seem like the custom timestamp is broken.""
This reverts commit 0a40077e23.
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
// fix for ipad modal form presentations
|
// fix for ipad modal form presentations
|
||||||
((UIScrollView *)self.view).scrollEnabled = NO;
|
((UIScrollView *)self.view).scrollEnabled = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGSize size = self.view.frame.size;
|
CGSize size = self.view.frame.size;
|
||||||
|
|
||||||
CGRect tableFrame = CGRectMake(0.0f, 0.0f, size.width, size.height - INPUT_HEIGHT);
|
CGRect tableFrame = CGRectMake(0.0f, 0.0f, size.width, size.height - INPUT_HEIGHT);
|
||||||
@@ -223,7 +223,11 @@
|
|||||||
return indexPath.row % 5 == 0;
|
return indexPath.row % 5 == 0;
|
||||||
break;
|
break;
|
||||||
case JSMessagesViewTimestampPolicyCustom:
|
case JSMessagesViewTimestampPolicyCustom:
|
||||||
return NO;
|
if ([self.delegate hasTimestampForRowAtIndexPath:indexPath]) {
|
||||||
|
return [self.delegate hasTimestampForRowAtIndexPath:indexPath];
|
||||||
|
} else {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,9 +302,9 @@
|
|||||||
UIEdgeInsets insets = UIEdgeInsetsMake(0.0f, 0.0f, self.tableView.contentInset.bottom + changeInHeight, 0.0f);
|
UIEdgeInsets insets = UIEdgeInsetsMake(0.0f, 0.0f, self.tableView.contentInset.bottom + changeInHeight, 0.0f);
|
||||||
self.tableView.contentInset = insets;
|
self.tableView.contentInset = insets;
|
||||||
self.tableView.scrollIndicatorInsets = insets;
|
self.tableView.scrollIndicatorInsets = insets;
|
||||||
|
|
||||||
[self scrollToBottomAnimated:NO];
|
[self scrollToBottomAnimated:NO];
|
||||||
|
|
||||||
CGRect inputViewFrame = self.inputView.frame;
|
CGRect inputViewFrame = self.inputView.frame;
|
||||||
self.inputView.frame = CGRectMake(0.0f,
|
self.inputView.frame = CGRectMake(0.0f,
|
||||||
inputViewFrame.origin.y - changeInHeight,
|
inputViewFrame.origin.y - changeInHeight,
|
||||||
@@ -348,7 +352,7 @@
|
|||||||
CGFloat messageViewFrameBottom = self.view.frame.size.height - INPUT_HEIGHT;
|
CGFloat messageViewFrameBottom = self.view.frame.size.height - INPUT_HEIGHT;
|
||||||
if(inputViewFrameY > messageViewFrameBottom)
|
if(inputViewFrameY > messageViewFrameBottom)
|
||||||
inputViewFrameY = messageViewFrameBottom;
|
inputViewFrameY = messageViewFrameBottom;
|
||||||
|
|
||||||
self.inputView.frame = CGRectMake(inputViewFrame.origin.x,
|
self.inputView.frame = CGRectMake(inputViewFrame.origin.x,
|
||||||
inputViewFrameY,
|
inputViewFrameY,
|
||||||
inputViewFrame.size.width,
|
inputViewFrame.size.width,
|
||||||
|
|||||||
Reference in New Issue
Block a user