2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Add animations enable/disable setting.

Open chats / users on mouse press if animations are disabled.
This commit is contained in:
John Preston
2018-09-20 20:56:45 +03:00
parent 04dd4e30a8
commit fd0719db6d
12 changed files with 113 additions and 41 deletions

View File

@@ -199,15 +199,17 @@ void SetupInterfaceScale(
}, slider->lifetime());
}
void OpenFaq() {
QDesktopServices::openUrl(telegramFaqLink());
}
void SetupFaq(not_null<Ui::VerticalLayout*> container, bool icon) {
AddButton(
container,
lng_settings_faq,
icon ? st::settingsSectionButton : st::settingsButton,
icon ? &st::settingsIconFaq : nullptr
)->addClickHandler([] {
QDesktopServices::openUrl(telegramFaqLink());
});
)->addClickHandler(OpenFaq);
}
void SetupHelp(not_null<Ui::VerticalLayout*> container) {
@@ -228,7 +230,17 @@ void SetupHelp(not_null<Ui::VerticalLayout*> container) {
Ui::showPeerHistory(user, ShowAtUnreadMsgId);
}
});
Auth().api().requestSupportContact(ready);
const auto sure = crl::guard(button, [=] {
Auth().api().requestSupportContact(ready);
});
auto box = Box<ConfirmBox>(
lang(lng_settings_ask_sure),
lang(lng_settings_ask_ok),
lang(lng_settings_faq_button),
sure,
OpenFaq);
box->setStrictCancel(true);
Ui::show(std::move(box));
});
}