mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix menu hide on single viewer / liker click.
This commit is contained in:
parent
9beb111956
commit
ba01ba4c33
2 changed files with 5 additions and 2 deletions
|
@ -1233,10 +1233,13 @@ void AddWhoReactedAction(
|
||||||
not_null<HistoryItem*> item,
|
not_null<HistoryItem*> item,
|
||||||
not_null<Window::SessionController*> controller) {
|
not_null<Window::SessionController*> controller) {
|
||||||
const auto whoReadIds = std::make_shared<Api::WhoReadList>();
|
const auto whoReadIds = std::make_shared<Api::WhoReadList>();
|
||||||
|
const auto weak = Ui::MakeWeak(menu.get());
|
||||||
const auto participantChosen = [=](uint64 id) {
|
const auto participantChosen = [=](uint64 id) {
|
||||||
|
if (const auto strong = weak.data()) {
|
||||||
|
strong->hideMenu();
|
||||||
|
}
|
||||||
controller->showPeerInfo(PeerId(id));
|
controller->showPeerInfo(PeerId(id));
|
||||||
};
|
};
|
||||||
const auto weak = Ui::MakeWeak(menu.get());
|
|
||||||
const auto showAllChosen = [=, itemId = item->fullId()]{
|
const auto showAllChosen = [=, itemId = item->fullId()]{
|
||||||
// Pressing on an item that has a submenu doesn't hide it :(
|
// Pressing on an item that has a submenu doesn't hide it :(
|
||||||
if (const auto strong = weak.data()) {
|
if (const auto strong = weak.data()) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 285527e3df689d291cae8a1923479da1b4d361d5
|
Subproject commit ab45ad614e0ed127e90b401e0835253131e47fa4
|
Loading…
Add table
Reference in a new issue