fix: just replace

This commit is contained in:
ZavaruKitsu 2023-06-22 22:02:18 +03:00
parent b71ca96d14
commit 6ebcd54c3a
2 changed files with 7 additions and 4 deletions

View file

@ -3888,5 +3888,3 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_ContextCopyID" = "Copy ID";
"ayu_IDCopiedToast" = "ID copied to clipboard.";
"ayu_DrawerGhostModeToggle" = "Ghost Mode";
"ayu_OpenFromTray" = "Open Ayugram";
"ayu_QuitFromTray" = "Quit Ayugram";

View file

@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "lang_auto.h"
#include "platform/platform_specific.h"
#include <QtWidgets/QApplication>
@ -68,7 +69,7 @@ void Tray::rebuildMenu() {
_activeForTrayIconAction = Core::App().isActiveForTrayMenu();
return _activeForTrayIconAction
? tr::lng_minimize_to_tray(tr::now)
: tr::ayu_OpenFromTray(tr::now);
: tr::lng_open_from_tray(tr::now).replace("Telegram", "AyuGram");
});
_tray.addAction(
@ -112,7 +113,11 @@ void Tray::rebuildMenu() {
AyuSettings::save();
});
_tray.addAction(tr::ayu_QuitFromTray(), [] { Core::Quit(); });
auto quitText = _textUpdates.events(
) | rpl::map([=] {
return tr::lng_quit_from_tray(tr::now).replace("Telegram", "AyuGram");
});
_tray.addAction(std::move(quitText), [] { Core::Quit(); });
updateMenuText();
}