mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
Disappearing of HistoryInner because of pending resize fixed.
This commit is contained in:
@@ -201,7 +201,7 @@ void HistoryInner::paintEvent(QPaintEvent *e) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_history && _history->hasPendingResizedItems()) || (_migrated && _migrated->hasPendingResizedItems())) {
|
||||
if (hasPendingResizedItems()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1455,9 +1455,7 @@ void HistoryInner::visibleAreaUpdated(int top, int bottom) {
|
||||
_visibleAreaBottom = bottom;
|
||||
|
||||
// if history has pending resize events we should not update scrollTopItem
|
||||
if (_history->hasPendingResizedItems()) {
|
||||
return;
|
||||
} else if (_migrated && _migrated->hasPendingResizedItems()) {
|
||||
if (hasPendingResizedItems()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1685,7 +1683,7 @@ void HistoryInner::onTouchSelect() {
|
||||
}
|
||||
|
||||
void HistoryInner::onUpdateSelected() {
|
||||
if (!_history || _history->hasPendingResizedItems() || (_migrated && _migrated->hasPendingResizedItems())) {
|
||||
if (!_history || hasPendingResizedItems()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3241,7 +3239,13 @@ void HistoryWidget::sendActionDone(const MTPBool &result, mtpRequestId req) {
|
||||
}
|
||||
|
||||
void HistoryWidget::activate() {
|
||||
if (_history) updateListSize(true);
|
||||
if (_history) {
|
||||
if (!_histInited) {
|
||||
updateListSize(true);
|
||||
} else if (hasPendingResizedItems()) {
|
||||
updateListSize();
|
||||
}
|
||||
}
|
||||
if (App::wnd()) App::wnd()->setInnerFocus();
|
||||
}
|
||||
|
||||
@@ -5064,7 +5068,11 @@ void HistoryWidget::doneShow() {
|
||||
updateReportSpamStatus();
|
||||
updateBotKeyboard();
|
||||
updateControlsVisibility();
|
||||
updateListSize(true);
|
||||
if (!_histInited) {
|
||||
updateListSize(true);
|
||||
} else if (hasPendingResizedItems()) {
|
||||
updateListSize();
|
||||
}
|
||||
preloadHistoryIfNeeded();
|
||||
if (App::wnd()) {
|
||||
App::wnd()->checkHistoryActivation();
|
||||
@@ -6296,7 +6304,7 @@ void HistoryWidget::notify_automaticLoadSettingsChangedGif() {
|
||||
}
|
||||
|
||||
void HistoryWidget::notify_handlePendingHistoryUpdate() {
|
||||
if ((_history && _history->hasPendingResizedItems()) || (_migrated && _migrated->hasPendingResizedItems())) {
|
||||
if (hasPendingResizedItems()) {
|
||||
updateListSize();
|
||||
_list->update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user