mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-05-29 19:23:58 +02:00
Show more frozen errors.
This commit is contained in:
parent
44d9525476
commit
906fc9cc1d
5 changed files with 24 additions and 2 deletions
|
@ -911,6 +911,8 @@ bool ShowEditBirthday(
|
||||||
const QVariant &context) {
|
const QVariant &context) {
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if (controller->showFrozenError()) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
const auto user = controller->session().user();
|
const auto user = controller->session().user();
|
||||||
const auto save = [=](Data::Birthday result) {
|
const auto save = [=](Data::Birthday result) {
|
||||||
|
@ -967,6 +969,8 @@ bool ShowEditPersonalChannel(
|
||||||
const QVariant &context) {
|
const QVariant &context) {
|
||||||
if (!controller) {
|
if (!controller) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if (controller->showFrozenError()) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto listController = std::make_unique<PersonalChannelController>(
|
auto listController = std::make_unique<PersonalChannelController>(
|
||||||
|
|
|
@ -453,12 +453,18 @@ void SetupRows(
|
||||||
|
|
||||||
Ui::AddSkip(container);
|
Ui::AddSkip(container);
|
||||||
|
|
||||||
|
const auto showEditName = [=] {
|
||||||
|
if (controller->showFrozenError()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
controller->show(Box<EditNameBox>(self));
|
||||||
|
};
|
||||||
AddRow(
|
AddRow(
|
||||||
container,
|
container,
|
||||||
tr::lng_settings_name_label(),
|
tr::lng_settings_name_label(),
|
||||||
Info::Profile::NameValue(self) | Ui::Text::ToWithEntities(),
|
Info::Profile::NameValue(self) | Ui::Text::ToWithEntities(),
|
||||||
tr::lng_profile_copy_fullname(tr::now),
|
tr::lng_profile_copy_fullname(tr::now),
|
||||||
[=] { controller->show(Box<EditNameBox>(self)); },
|
showEditName,
|
||||||
{ &st::menuIconProfile });
|
{ &st::menuIconProfile });
|
||||||
|
|
||||||
const auto showChangePhone = [=] {
|
const auto showChangePhone = [=] {
|
||||||
|
@ -508,6 +514,9 @@ void SetupRows(
|
||||||
std::move(value),
|
std::move(value),
|
||||||
tr::lng_context_copy_mention(tr::now),
|
tr::lng_context_copy_mention(tr::now),
|
||||||
[=] {
|
[=] {
|
||||||
|
if (controller->showFrozenError()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto box = controller->show(
|
const auto box = controller->show(
|
||||||
Box(UsernamesBox, session->user()));
|
Box(UsernamesBox, session->user()));
|
||||||
box->boxClosing(
|
box->boxClosing(
|
||||||
|
|
|
@ -229,6 +229,9 @@ void Cover::initViewers() {
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
_username->overrideLinkClickHandler([=] {
|
_username->overrideLinkClickHandler([=] {
|
||||||
|
if (_controller->showFrozenError()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto username = _user->username();
|
const auto username = _user->username();
|
||||||
if (username.isEmpty()) {
|
if (username.isEmpty()) {
|
||||||
_controller->show(Box(UsernamesBox, _user));
|
_controller->show(Box(UsernamesBox, _user));
|
||||||
|
|
|
@ -276,6 +276,10 @@ void UserpicButton::setClickHandlerByRole() {
|
||||||
void UserpicButton::choosePhotoLocally() {
|
void UserpicButton::choosePhotoLocally() {
|
||||||
if (!_window) {
|
if (!_window) {
|
||||||
return;
|
return;
|
||||||
|
} else if (const auto controller = _window->sessionController()) {
|
||||||
|
if (controller->showFrozenError()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const auto callback = [=](ChosenType type) {
|
const auto callback = [=](ChosenType type) {
|
||||||
return [=](QImage &&image) {
|
return [=](QImage &&image) {
|
||||||
|
|
|
@ -894,7 +894,9 @@ void MainMenu::updateInnerControlsGeometry() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenu::chooseEmojiStatus() {
|
void MainMenu::chooseEmojiStatus() {
|
||||||
if (const auto widget = _badge->widget()) {
|
if (_controller->showFrozenError()) {
|
||||||
|
return;
|
||||||
|
} else if (const auto widget = _badge->widget()) {
|
||||||
_emojiStatusPanel->show(_controller, widget, _badge->sizeTag());
|
_emojiStatusPanel->show(_controller, widget, _badge->sizeTag());
|
||||||
} else {
|
} else {
|
||||||
ShowPremiumPreviewBox(_controller, PremiumFeature::EmojiStatus);
|
ShowPremiumPreviewBox(_controller, PremiumFeature::EmojiStatus);
|
||||||
|
|
Loading…
Add table
Reference in a new issue