mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 05:37:09 +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_menu_icons.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
|
||||||
|
// AyuGram includes
|
||||||
|
#include "ayu/ui/settings/settings_ayu.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Info {
|
namespace Info {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -348,7 +352,8 @@ void WrapWidget::createTopBar() {
|
||||||
&& (section.settingsType()
|
&& (section.settingsType()
|
||||||
== ::Settings::CloudPasswordEmailConfirmId()
|
== ::Settings::CloudPasswordEmailConfirmId()
|
||||||
|| section.settingsType() == ::Settings::Main::Id()
|
|| section.settingsType() == ::Settings::Main::Id()
|
||||||
|| section.settingsType() == ::Settings::Chat::Id())) {
|
|| section.settingsType() == ::Settings::Chat::Id()
|
||||||
|
|| section.settingsType() == ::Settings::Ayu::Id())) {
|
||||||
addTopBarMenuButton();
|
addTopBarMenuButton();
|
||||||
} else if (section.type() == Section::Type::Downloads) {
|
} else if (section.type() == Section::Type::Downloads) {
|
||||||
auto &manager = Core::App().downloadManager();
|
auto &manager = Core::App().downloadManager();
|
||||||
|
|
|
@ -32,6 +32,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
|
// AyuGram includes
|
||||||
|
#include "ayu/ui/settings/settings_ayu.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
|
||||||
void FillMenu(
|
void FillMenu(
|
||||||
|
@ -56,6 +60,11 @@ void FillMenu(
|
||||||
tr::lng_settings_password_abort(tr::now),
|
tr::lng_settings_password_abort(tr::now),
|
||||||
[=] { api->cloudPassword().clearUnconfirmedPassword(); },
|
[=] { api->cloudPassword().clearUnconfirmedPassword(); },
|
||||||
&st::menuIconCancel);
|
&st::menuIconCancel);
|
||||||
|
} else if (type == Ayu::Id()) {
|
||||||
|
addAction(
|
||||||
|
tr::lng_restart_button(tr::now),
|
||||||
|
[=] { Core::Restart(); },
|
||||||
|
&st::menuIconRestore);
|
||||||
} else {
|
} else {
|
||||||
const auto &list = Core::App().domain().accounts();
|
const auto &list = Core::App().domain().accounts();
|
||||||
if (list.size() < Core::App().domain().maxAccounts()) {
|
if (list.size() < Core::App().domain().maxAccounts()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue