mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
parent
7f6e871b26
commit
8596b0309e
3 changed files with 4 additions and 4 deletions
|
@ -3275,7 +3275,7 @@ void HistoryInner::checkActivation() {
|
|||
session().data().histories().readInboxTill(view->data());
|
||||
}
|
||||
|
||||
void HistoryInner::recountHistoryGeometry() {
|
||||
void HistoryInner::recountHistoryGeometry(bool initial) {
|
||||
_contentWidth = _scroll->width();
|
||||
|
||||
if (_history->hasPendingResizedItems()
|
||||
|
@ -3333,7 +3333,7 @@ void HistoryInner::recountHistoryGeometry() {
|
|||
}
|
||||
|
||||
auto historyPaddingTopDelta = (newHistoryPaddingTop - oldHistoryPaddingTop);
|
||||
if (historyPaddingTopDelta != 0) {
|
||||
if (!initial && historyPaddingTopDelta != 0) {
|
||||
if (_history->scrollTopItem) {
|
||||
_history->scrollTopOffset += historyPaddingTopDelta;
|
||||
} else if (_migrated && _migrated->scrollTopItem) {
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
void setItemsRevealHeight(int revealHeight);
|
||||
void changeItemsRevealHeight(int revealHeight);
|
||||
void checkActivation();
|
||||
void recountHistoryGeometry();
|
||||
void recountHistoryGeometry(bool initial = false);
|
||||
void updateSize();
|
||||
void setShownPinned(HistoryItem *item);
|
||||
|
||||
|
|
|
@ -6610,7 +6610,7 @@ void HistoryWidget::startMessageSendingAnimation(
|
|||
void HistoryWidget::updateListSize() {
|
||||
Expects(_list != nullptr);
|
||||
|
||||
_list->recountHistoryGeometry();
|
||||
_list->recountHistoryGeometry(!_historyInited);
|
||||
auto washidden = _scroll->isHidden();
|
||||
if (washidden) {
|
||||
_scroll->show();
|
||||
|
|
Loading…
Add table
Reference in a new issue