Fixed crash on pinning dialog from context menu.

Regression was introduced in 3a147305b7.
This commit is contained in:
23rd 2020-06-17 17:00:20 +03:00 committed by John Preston
parent 0824d2da20
commit b49a8e6dc1
1 changed files with 2 additions and 1 deletions

View File

@ -306,6 +306,7 @@ void Filler::addHidePromotion() {
} }
void Filler::addTogglePin() { void Filler::addTogglePin() {
const auto controller = _controller;
const auto filterId = _filterId; const auto filterId = _filterId;
const auto peer = _peer; const auto peer = _peer;
const auto history = peer->owner().history(peer); const auto history = peer->owner().history(peer);
@ -315,7 +316,7 @@ void Filler::addTogglePin() {
: tr::lng_context_pin_to_top(tr::now); : tr::lng_context_pin_to_top(tr::now);
}; };
const auto pinToggle = [=] { const auto pinToggle = [=] {
TogglePinnedDialog(_controller, history, filterId); TogglePinnedDialog(controller, history, filterId);
}; };
const auto pinAction = _addAction(pinText(), pinToggle); const auto pinAction = _addAction(pinText(), pinToggle);