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

Replaced Ui::InformBox and Ui::ConfirmBox with GenericBox.

This commit is contained in:
23rd
2022-02-27 11:23:20 +03:00
parent d5a44a2ba4
commit 5718789d53
89 changed files with 796 additions and 733 deletions

View File

@@ -191,7 +191,7 @@ void Instance::startOutgoingCall(not_null<UserData*> user, bool video) {
if (user->callsStatus() == UserData::CallsStatus::Private) {
// Request full user once more to refresh the setting in case it was changed.
user->session().api().requestFullPeer(user);
Ui::show(Box<Ui::InformBox>(
Ui::show(Ui::MakeInformBox(
tr::lng_call_error_not_available(tr::now, lt_user, user->name)));
return;
}
@@ -714,13 +714,14 @@ void Instance::requestPermissionOrFail(Platform::PermissionType type, Fn<void()>
if (inGroupCall()) {
_currentGroupCall->hangup();
}
Ui::show(Box<Ui::ConfirmBox>(
tr::lng_no_mic_permission(tr::now),
tr::lng_menu_settings(tr::now),
crl::guard(this, [=] {
Ui::show(Ui::MakeConfirmBox({
.text = tr::lng_no_mic_permission(),
.confirmed = crl::guard(this, [=] {
Platform::OpenSystemSettingsForPermission(type);
Ui::hideLayer();
})));
}),
.confirmText = tr::lng_menu_settings(),
}));
}
}