2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 07:05:13 +00:00

Replace base::lambda with shorter term.

base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
This commit is contained in:
John Preston
2018-06-04 18:35:11 +03:00
parent 8d1cdea31a
commit dd81f5d59f
216 changed files with 792 additions and 1455 deletions

View File

@@ -297,7 +297,7 @@ void SessionsBox::Inner::onTerminate() {
for (auto i = _terminateButtons.begin(), e = _terminateButtons.end(); i != e; ++i) {
if (i.value()->isOver()) {
if (_terminateBox) _terminateBox->deleteLater();
_terminateBox = Ui::show(Box<ConfirmBox>(lang(lng_settings_reset_one_sure), lang(lng_settings_reset_button), st::attentionBoxButton, base::lambda_guarded(this, [this, terminating = i.key()] {
_terminateBox = Ui::show(Box<ConfirmBox>(lang(lng_settings_reset_one_sure), lang(lng_settings_reset_button), st::attentionBoxButton, crl::guard(this, [this, terminating = i.key()] {
if (_terminateBox) {
_terminateBox->closeBox();
_terminateBox = nullptr;
@@ -315,7 +315,7 @@ void SessionsBox::Inner::onTerminate() {
void SessionsBox::Inner::onTerminateAll() {
if (_terminateBox) _terminateBox->deleteLater();
_terminateBox = Ui::show(Box<ConfirmBox>(lang(lng_settings_reset_sure), lang(lng_settings_reset_button), st::attentionBoxButton, base::lambda_guarded(this, [this] {
_terminateBox = Ui::show(Box<ConfirmBox>(lang(lng_settings_reset_sure), lang(lng_settings_reset_button), st::attentionBoxButton, crl::guard(this, [this] {
if (_terminateBox) {
_terminateBox->closeBox();
_terminateBox = nullptr;