Fixed last post overlapping pull-to-next card while loading.

This commit is contained in:
23rd
2026-07-07 13:29:05 +03:00
committed by John Preston
parent a492ffc7f7
commit 70bde5f7d5
2 changed files with 5 additions and 2 deletions

View File

@@ -677,6 +677,7 @@ void PullToNextChannel::handleOverscroll(
&& (next->unreadCount() > 0)
&& active()) {
_pulling = false;
_jumping = true;
_scroll->setContentBottomInset(int(base::SafeRound(_effective)));
crl::on_main(_parent.get(), [=] { jumpWhenReady(next, 0); });
return;
@@ -691,6 +692,7 @@ void PullToNextChannel::clearState() {
_dwellTimer.cancel();
_pulling = false;
_committed = false;
_jumping = false;
_reached = false;
_peakPull = 0.;
_pull = 0.;
@@ -725,8 +727,8 @@ void PullToNextChannel::pushIndicator() {
float64(st::historyPullNextMaxHeight),
_pull + expand * (card - threshold));
_effective = effective;
_scroll->setContentBottomInset(
std::max(0, int(base::SafeRound(effective - _pull))));
_scroll->setContentBottomInset(std::max(0, int(base::SafeRound(
_jumping ? effective : (effective - _pull)))));
_indicator->setData(effective, _reached, _next);
_hint->setData(_pull > 0., _reached, _next);
}

View File

@@ -68,6 +68,7 @@ private:
bool _pulling = false;
bool _committed = false;
bool _jumping = false;
bool _reached = false;
bool _expandTo = false;
float64 _pull = 0.;