mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
feat: add restart button to preferences
This commit is contained in:
parent
e0c2294d50
commit
b6bbf3a560
2 changed files with 15 additions and 1 deletions
|
@ -49,6 +49,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "styles/style_menu_icons.h"
|
||||
#include "styles/style_layers.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ui/settings/settings_ayu.h"
|
||||
|
||||
|
||||
namespace Info {
|
||||
namespace {
|
||||
|
||||
|
@ -348,7 +352,8 @@ void WrapWidget::createTopBar() {
|
|||
&& (section.settingsType()
|
||||
== ::Settings::CloudPasswordEmailConfirmId()
|
||||
|| section.settingsType() == ::Settings::Main::Id()
|
||||
|| section.settingsType() == ::Settings::Chat::Id())) {
|
||||
|| section.settingsType() == ::Settings::Chat::Id()
|
||||
|| section.settingsType() == ::Settings::Ayu::Id())) {
|
||||
addTopBarMenuButton();
|
||||
} else if (section.type() == Section::Type::Downloads) {
|
||||
auto &manager = Core::App().downloadManager();
|
||||
|
|
|
@ -32,6 +32,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include <QAction>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ui/settings/settings_ayu.h"
|
||||
|
||||
|
||||
namespace Settings {
|
||||
|
||||
void FillMenu(
|
||||
|
@ -56,6 +60,11 @@ void FillMenu(
|
|||
tr::lng_settings_password_abort(tr::now),
|
||||
[=] { api->cloudPassword().clearUnconfirmedPassword(); },
|
||||
&st::menuIconCancel);
|
||||
} else if (type == Ayu::Id()) {
|
||||
addAction(
|
||||
tr::lng_restart_button(tr::now),
|
||||
[=] { Core::Restart(); },
|
||||
&st::menuIconRestore);
|
||||
} else {
|
||||
const auto &list = Core::App().domain().accounts();
|
||||
if (list.size() < Core::App().domain().maxAccounts()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue