Fixed crash on pinning dialog from context menu.
Regression was introduced in 3a147305b7.
This commit is contained in:
parent
0824d2da20
commit
b49a8e6dc1
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue