mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Improve scroll to unread bar.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user