Skip to content

Commit

Permalink
feat: add restart button to preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyZavar committed Jan 3, 2024
1 parent e0c2294 commit b6bbf3a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Telegram/SourceFiles/info/info_wrap_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ For license and copyright information please follow this link:
#include "styles/style_menu_icons.h"
#include "styles/style_layers.h"

// AyuGram includes
#include "ayu/ui/settings/settings_ayu.h"


namespace Info {
namespace {

Expand Down Expand Up @@ -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();
Expand Down
9 changes: 9 additions & 0 deletions Telegram/SourceFiles/settings/settings_common_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ For license and copyright information please follow this link:

#include <QAction>

// AyuGram includes
#include "ayu/ui/settings/settings_ayu.h"


namespace Settings {

void FillMenu(
Expand All @@ -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()) {
Expand Down

0 comments on commit b6bbf3a

Please sign in to comment.