Beta version 5.5.7: Workaround MSVC bug.

This commit is contained in:
John Preston 2024-10-01 10:55:42 +04:00
parent b518f7c4c4
commit 1cb92ef69a

View file

@ -318,6 +318,8 @@ HistoryWidget::HistoryWidget(
) | rpl::start_with_next(crl::guard(_list, [=] {
_list->onParentGeometryChanged();
}), lifetime());
const auto weak = Ui::MakeWeak(this);
_scroll->addContentRequests(
) | rpl::start_with_next([=] {
if (_history && _history->loadedAtBottom()) {
@ -332,7 +334,7 @@ HistoryWidget::HistoryWidget(
if (tryToAppend() == Result::MediaLoading) {
const auto sharedLifetime = std::make_shared<rpl::lifetime>();
session().downloaderTaskFinished(
) | rpl::start_with_next([=, weak = Ui::MakeWeak(this)] {
) | rpl::start_with_next([=] {
if (const auto strong = weak.data()) {
if (tryToAppend() != Result::MediaLoading) {
sharedLifetime->destroy();