Improve scroll to unread bar.
This commit is contained in:
parent
e8df47c926
commit
62da24c20b
|
@ -528,9 +528,10 @@ void ListWidget::restoreScrollState() {
|
|||
return;
|
||||
}
|
||||
if (!_scrollTopState.item) {
|
||||
if (!_bar.element || !_bar.focus) {
|
||||
if (!_bar.element || !_bar.focus || _scrollInited) {
|
||||
return;
|
||||
}
|
||||
_scrollInited = true;
|
||||
_scrollTopState.item = _bar.element->data()->position();
|
||||
_scrollTopState.shift = st::lineWidth + st::historyUnreadBarMargin;
|
||||
}
|
||||
|
|
|
@ -496,6 +496,7 @@ private:
|
|||
Ui::Animations::Simple _scrollToAnimation;
|
||||
Fn<bool()> _overrideInitialScroll;
|
||||
|
||||
bool _scrollInited = false;
|
||||
bool _scrollDateShown = false;
|
||||
Ui::Animations::Simple _scrollDateOpacity;
|
||||
SingleQueuedInvokation _scrollDateCheck;
|
||||
|
|
Loading…
Reference in New Issue