mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Fixed crash on checking sponsored state with closed dialog.
This commit is contained in:
parent
6af93b3497
commit
7993c6207a
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue