mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Add three dot menu to settings. Edit + logout.
This commit is contained in:
@@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "settings/settings_main.h"
|
||||
#include "settings/settings_notifications.h"
|
||||
#include "settings/settings_privacy_security.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
namespace Settings {
|
||||
|
||||
@@ -38,4 +40,13 @@ object_ptr<Section> CreateSection(
|
||||
Unexpected("Settings section type in Widget::createInnerWidget.");
|
||||
}
|
||||
|
||||
void FillMenu(Fn<void(Type)> showOther, MenuCallback addAction) {
|
||||
addAction(
|
||||
lang(lng_settings_edit_info),
|
||||
[=] { showOther(Type::Information); });
|
||||
addAction(
|
||||
lang(lng_settings_logout),
|
||||
[=] { App::wnd()->onLogout(); });
|
||||
}
|
||||
|
||||
} // namespace Settings
|
||||
|
Reference in New Issue
Block a user