2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix build with GCC.

This commit is contained in:
John Preston
2022-11-02 08:51:03 +04:00
parent 45cacc94c0
commit fdf4129e5e
28 changed files with 28 additions and 64 deletions

View File

@@ -1125,25 +1125,21 @@ void ShareBox::Inner::chooseForumTopic(not_null<Data::Forum*> forum) {
updateChatName(chat);
changePeerCheckState(chat, true);
};
auto initBox = [](not_null<PeerListBox*> box) {
box->addButton(tr::lng_cancel(), [box] {
auto initBox = [=](not_null<PeerListBox*> box) {
box->addButton(tr::lng_cancel(), [=] {
box->closeBox();
});
forum->destroyed(
) | rpl::start_with_next([=] {
box->closeBox();
}, box->lifetime());
};
auto box = Box<PeerListBox>(
std::make_unique<ChooseTopicBoxController>(
forum,
std::move(chosen)),
[=](not_null<PeerListBox*> box) {
box->addButton(tr::lng_cancel(), [=] {
box->closeBox();
});
forum->destroyed(
) | rpl::start_with_next([=] {
box->closeBox();
}, box->lifetime());
});
std::move(initBox));
*weak = box.data();
_show->showBox(std::move(box));
}