Skip to content

Commit

Permalink
Beta version 5.5.7: Workaround MSVC bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Oct 1, 2024
1 parent b518f7c commit 1cb92ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/history/history_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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();
Expand Down

0 comments on commit 1cb92ef

Please sign in to comment.