Preserve scroll state across conversation view layout changes, if possible.
// FREEBIE
This commit is contained in:
parent
b2c8ad2d29
commit
95eaa2c3bb
@ -4501,6 +4501,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
|
||||
{
|
||||
OWSAssert([NSThread isMainThread]);
|
||||
|
||||
// JSQMessageView has glitchy behavior. When presenting/dismissing view
|
||||
// controllers, the size of the input toolbar and/or collection view can
|
||||
// repeatedly change, leaving scroll state in an invalid state. The
|
||||
// simplest fix that covers most cases is to ensure that we remain
|
||||
// "scrolled to bottom" across these changes.
|
||||
if (self.wasScrolledToBottomBeforeLayoutChange) {
|
||||
[self scrollToBottomImmediately];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user