Fixed crash on checking sponsored state with closed dialog.
This commit is contained in:
parent
6af93b3497
commit
7993c6207a
|
@ -2289,7 +2289,10 @@ void HistoryWidget::showHistory(
|
||||||
|
|
||||||
{
|
{
|
||||||
_scroll->setTrackingContent(false);
|
_scroll->setTrackingContent(false);
|
||||||
const auto checkState = crl::guard(this, [=] {
|
const auto checkState = crl::guard(this, [=, history = _history] {
|
||||||
|
if (history != _history) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto &sponsored = session().data().sponsoredMessages();
|
auto &sponsored = session().data().sponsoredMessages();
|
||||||
using State = Data::SponsoredMessages::State;
|
using State = Data::SponsoredMessages::State;
|
||||||
const auto state = sponsored.state(_history);
|
const auto state = sponsored.state(_history);
|
||||||
|
|
Loading…
Reference in New Issue