mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix possible crash in usernames order saving.
This commit is contained in:
@@ -2294,6 +2294,9 @@ void Controller::saveUsernamesOrder() {
|
||||
continueSave();
|
||||
}).send();
|
||||
} else {
|
||||
const auto weakContinue = crl::guard(this, [=] {
|
||||
continueSave();
|
||||
});
|
||||
const auto lifetime = std::make_shared<rpl::lifetime>();
|
||||
const auto newUsernames = (*_savingData.usernamesOrder);
|
||||
_peer->session().api().usernames().reorder(
|
||||
@@ -2311,7 +2314,7 @@ void Controller::saveUsernamesOrder() {
|
||||
.editable = editable,
|
||||
};
|
||||
}) | ranges::to_vector);
|
||||
continueSave();
|
||||
weakContinue();
|
||||
lifetime->destroy();
|
||||
}, *lifetime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user