mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix a possible crash in folder link export.
This commit is contained in:
parent
b4a588a676
commit
004a60ded5
1 changed files with 4 additions and 3 deletions
|
@ -777,12 +777,13 @@ void EditFilterBox(
|
||||||
data->force_assign(updated);
|
data->force_assign(updated);
|
||||||
const auto id = updated.id();
|
const auto id = updated.id();
|
||||||
state->links = owner->chatsFilters().chatlistLinks(id);
|
state->links = owner->chatsFilters().chatlistLinks(id);
|
||||||
ExportFilterLink(id, shared, [=](Data::ChatFilterLink link) {
|
ExportFilterLink(id, shared, crl::guard(box, [=](
|
||||||
|
Data::ChatFilterLink link) {
|
||||||
Expects(link.id == id);
|
Expects(link.id == id);
|
||||||
|
|
||||||
*data = data->current().withChatlist(true, true);
|
*data = data->current().withChatlist(true, true);
|
||||||
window->show(ShowLinkBox(window, updated, link));
|
window->show(ShowLinkBox(window, updated, link));
|
||||||
}, [=](QString error) {
|
}), crl::guard(box, [=](QString error) {
|
||||||
const auto session = &window->session();
|
const auto session = &window->session();
|
||||||
if (error == u"CHATLISTS_TOO_MUCH"_q) {
|
if (error == u"CHATLISTS_TOO_MUCH"_q) {
|
||||||
window->show(Box(ShareableFiltersLimitBox, session));
|
window->show(Box(ShareableFiltersLimitBox, session));
|
||||||
|
@ -796,7 +797,7 @@ void EditFilterBox(
|
||||||
} else {
|
} else {
|
||||||
window->show(ShowLinkBox(window, updated, { .id = id }));
|
window->show(ShowLinkBox(window, updated, { .id = id }));
|
||||||
}
|
}
|
||||||
});
|
}));
|
||||||
}));
|
}));
|
||||||
}, createLink->lifetime());
|
}, createLink->lifetime());
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
|
|
Loading…
Add table
Reference in a new issue