2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 08:05:12 +00:00

Better versioning and naming to separate from original app

This commit is contained in:
RadRussianRus
2019-09-27 03:04:15 +03:00
parent 746212fb1c
commit c473b1400a
14 changed files with 54 additions and 46 deletions

View File

@@ -2220,4 +2220,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_mac_touchbar_favorite_stickers" = "Favorite stickers"; "lng_mac_touchbar_favorite_stickers" = "Favorite stickers";
// Kotatogram keys
"ktg_about_text1" = "Experimental unofficial {tdesktop_link} fork.";
"ktg_about_text1_tdesktop" = "Telegram Desktop";
"ktg_about_text3" = "Visit {channel_link} or {faq_link} for more info.";
"ktg_about_text3_channel" = "Kotatogram channel";
// Keys finished // Keys finished

View File

@@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,8,8,0 FILEVERSION 1,8,8,1
PRODUCTVERSION 1,8,8,0 PRODUCTVERSION 1,8,8,1
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@@ -50,12 +50,12 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "Telegram FZ-LLC" VALUE "CompanyName", "Kotatogram"
VALUE "FileDescription", "Telegram Desktop" VALUE "FileDescription", "Kotatogram Desktop"
VALUE "FileVersion", "1.8.8.0" VALUE "FileVersion", "1.8.8.1"
VALUE "LegalCopyright", "Copyright (C) 2014-2019" VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Kotatogram Desktop"
VALUE "ProductVersion", "1.8.8.0" VALUE "ProductVersion", "1.8.8.1"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@@ -27,10 +27,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace { namespace {
rpl::producer<TextWithEntities> Text1() { rpl::producer<TextWithEntities> Text1() {
return tr::lng_about_text1( return tr::ktg_about_text1(
lt_api_link, lt_tdesktop_link,
tr::lng_about_text1_api( tr::ktg_about_text1_tdesktop(
) | Ui::Text::ToLink("https://core.telegram.org/api"), ) | Ui::Text::ToLink("https://desktop.telegram.org/"),
Ui::Text::WithEntities); Ui::Text::WithEntities);
} }
@@ -48,7 +48,9 @@ rpl::producer<TextWithEntities> Text2() {
} }
rpl::producer<TextWithEntities> Text3() { rpl::producer<TextWithEntities> Text3() {
return tr::lng_about_text3( return tr::ktg_about_text3(
lt_channel_link,
tr::ktg_about_text3_channel() | Ui::Text::ToLink("https://t.me/kotatogram"),
lt_faq_link, lt_faq_link,
tr::lng_about_text3_faq() | Ui::Text::ToLink(telegramFaqLink()), tr::lng_about_text3_faq() | Ui::Text::ToLink(telegramFaqLink()),
Ui::Text::WithEntities); Ui::Text::WithEntities);

View File

@@ -14,7 +14,7 @@ constexpr str_const AppNameOld = "Telegram Win (Unofficial)";
constexpr str_const AppName = "Kotatogram Desktop"; constexpr str_const AppName = "Kotatogram Desktop";
constexpr str_const AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows constexpr str_const AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows
constexpr str_const AppFile = "Telegram"; constexpr str_const AppFile = "Kotatogram";
enum { enum {
MaxSelectedItems = 100, MaxSelectedItems = 100,

View File

@@ -34,7 +34,7 @@ PreLaunchWindow::PreLaunchWindow(QString title) {
setWindowIcon(Window::CreateIcon()); setWindowIcon(Window::CreateIcon());
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
setWindowTitle(title.isEmpty() ? qsl("Telegram") : title); setWindowTitle(title.isEmpty() ? qsl("Kotatogram") : title);
QPalette p(palette()); QPalette p(palette());
p.setColor(QPalette::Background, QColor(255, 255, 255)); p.setColor(QPalette::Background, QColor(255, 255, 255));
@@ -409,7 +409,7 @@ QByteArray LastCrashedWindow::getCrashReportRaw() const {
} }
void LastCrashedWindow::onGetApp() { void LastCrashedWindow::onGetApp() {
QDesktopServices::openUrl(qsl("https://desktop.telegram.org")); QDesktopServices::openUrl(qsl("https://github.com/kotatogram/kotatogram-desktop"));
} }
void LastCrashedWindow::excludeReportUsername() { void LastCrashedWindow::excludeReportUsername() {

View File

@@ -242,14 +242,14 @@ void Launcher::init() {
prepareSettings(); prepareSettings();
QApplication::setApplicationName(qsl("TelegramDesktop")); QApplication::setApplicationName(qsl("KotatogramDesktop"));
#ifdef TDESKTOP_LAUNCHER_FILENAME #ifdef TDESKTOP_LAUNCHER_FILENAME
#define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V
#define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V)
QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME))); QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME)));
#elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) #elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
QApplication::setDesktopFileName(qsl("telegramdesktop.desktop")); QApplication::setDesktopFileName(qsl("kotatogramdesktop.desktop"));
#endif #endif
#ifndef OS_MAC_OLD #ifndef OS_MAC_OLD
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
@@ -273,7 +273,7 @@ int Launcher::exec() {
auto result = executeApplication(); auto result = executeApplication();
DEBUG_LOG(("Telegram finished, result: %1").arg(result)); DEBUG_LOG(("Kotatogram finished, result: %1").arg(result));
if (!UpdaterDisabled() && cRestartingUpdate()) { if (!UpdaterDisabled() && cRestartingUpdate()) {
DEBUG_LOG(("Sandbox Info: executing updater to install update.")); DEBUG_LOG(("Sandbox Info: executing updater to install update."));
@@ -281,7 +281,7 @@ int Launcher::exec() {
psDeleteDir(cWorkingDir() + qsl("tupdates/temp")); psDeleteDir(cWorkingDir() + qsl("tupdates/temp"));
} }
} else if (cRestarting()) { } else if (cRestarting()) {
DEBUG_LOG(("Sandbox Info: executing Telegram because of restart.")); DEBUG_LOG(("Sandbox Info: executing Kotatogram because of restart."));
launchUpdater(UpdaterLaunch::JustRelaunch); launchUpdater(UpdaterLaunch::JustRelaunch);
} }

View File

@@ -16,6 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#endif // TDESKTOP_OFFICIAL_TARGET #endif // TDESKTOP_OFFICIAL_TARGET
constexpr auto AppVersion = 1008008; constexpr auto AppVersion = 1008008;
constexpr auto AppVersionStr = "1.8.8-KTG1"; constexpr auto AppVersionStr = "1.8.8.1";
constexpr auto AppBetaVersion = false; constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;

View File

@@ -558,8 +558,8 @@ void MainWindow::psFirstShow() {
#define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V)
TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME), TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME),
#endif // TDESKTOP_LAUNCHER_FILENAME #endif // TDESKTOP_LAUNCHER_FILENAME
"telegramdesktop.desktop", "kotatogramdesktop.desktop",
"Telegram.desktop" "Kotatogram.desktop"
}; };
for (auto it = possibleDesktopFiles.begin(); it != possibleDesktopFiles.end(); it++) { for (auto it = possibleDesktopFiles.begin(); it != possibleDesktopFiles.end(); it++) {
@@ -574,8 +574,8 @@ void MainWindow::psFirstShow() {
LOG(("Could not get Unity Launcher entry!")); LOG(("Could not get Unity Launcher entry!"));
} }
} else { } else {
LOG(("SNAP Environment detected, setting Launcher entry to %1-telegramdesktop.desktop!").arg(snapName)); LOG(("SNAP Environment detected, setting Launcher entry to %1-kotatogramdesktop.desktop!").arg(snapName));
_desktopFile = snapName + "_telegramdesktop.desktop"; _desktopFile = snapName + "_kotatogramdesktop.desktop";
useUnityCount=true; useUnityCount=true;
} }
_dbusPath = "/com/canonical/unity/launcherentry/" + QString::number(djbStringHash("application://" + _desktopFile)); _dbusPath = "/com/canonical/unity/launcherentry/" + QString::number(djbStringHash("application://" + _desktopFile));

View File

@@ -153,7 +153,7 @@ private:
Libs::notify_notification_set_hint_string(_data, "x-canonical-append", "true"); Libs::notify_notification_set_hint_string(_data, "x-canonical-append", "true");
} }
Libs::notify_notification_set_hint_string(_data, "desktop-entry", "telegramdesktop"); Libs::notify_notification_set_hint_string(_data, "desktop-entry", "kotatogramdesktop");
auto signalReceiver = Libs::g_object_cast(_data); auto signalReceiver = Libs::g_object_cast(_data);
auto signalHandler = G_CALLBACK(NotificationData::notificationClosed); auto signalHandler = G_CALLBACK(NotificationData::notificationClosed);

View File

@@ -285,7 +285,7 @@ void RegisterCustomScheme() {
QDir().mkpath(path); QDir().mkpath(path);
QFile f(file); QFile f(file);
if (f.open(QIODevice::WriteOnly)) { if (f.open(QIODevice::WriteOnly)) {
QString icon = icons + qsl("telegram.png"); QString icon = icons + qsl("kotatogram.png");
auto iconExists = QFile(icon).exists(); auto iconExists = QFile(icon).exists();
if (Local::oldSettingsVersion() < 10021 && iconExists) { if (Local::oldSettingsVersion() < 10021 && iconExists) {
// Icon was changed. // Icon was changed.
@@ -307,19 +307,19 @@ void RegisterCustomScheme() {
s << "Comment=Experimental Telegram Desktop fork\n"; s << "Comment=Experimental Telegram Desktop fork\n";
s << "TryExec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << "\n"; s << "TryExec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << "\n";
s << "Exec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n"; s << "Exec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n";
s << "Icon=telegram\n"; s << "Icon=kotatogram\n";
s << "Terminal=false\n"; s << "Terminal=false\n";
s << "StartupWMClass=KotatogramDesktop\n"; s << "StartupWMClass=KotatogramDesktop\n";
s << "Type=Application\n"; s << "Type=Application\n";
s << "Categories=Network;InstantMessaging;Qt;\n"; s << "Categories=Network;InstantMessaging;Qt;\n";
s << "MimeType=x-scheme-handler/tg;\n"; s << "MimeType=x-scheme-handler/tg;\n";
s << "Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;kotatogram;\n"; s << "Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;\n";
s << "X-GNOME-UsesNotifications=true\n"; s << "X-GNOME-UsesNotifications=true\n";
f.close(); f.close();
if (RunShellCommand("desktop-file-install --dir=" + EscapeShell(QFile::encodeName(home + qsl(".local/share/applications"))) + " --delete-original " + EscapeShell(QFile::encodeName(file)))) { if (RunShellCommand("desktop-file-install --dir=" + EscapeShell(QFile::encodeName(home + qsl(".local/share/applications"))) + " --delete-original " + EscapeShell(QFile::encodeName(file)))) {
DEBUG_LOG(("App Info: removing old .desktop file")); DEBUG_LOG(("App Info: removing old .desktop file"));
QFile(qsl("%1.local/share/applications/telegram.desktop").arg(home)).remove(); QFile(qsl("%1.local/share/applications/kotatogram.desktop").arg(home)).remove();
RunShellCommand("update-desktop-database " + EscapeShell(QFile::encodeName(home + qsl(".local/share/applications")))); RunShellCommand("update-desktop-database " + EscapeShell(QFile::encodeName(home + qsl(".local/share/applications"))));
RunShellCommand("xdg-mime default kotatogramdesktop.desktop x-scheme-handler/tg"); RunShellCommand("xdg-mime default kotatogramdesktop.desktop x-scheme-handler/tg");

View File

@@ -65,7 +65,7 @@ HWND createTaskbarHider() {
HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0); HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0);
HWND hWnd = 0; HWND hWnd = 0;
QString cn = QString("TelegramTaskbarHider"); QString cn = QString("KotatogramTaskbarHider");
LPCWSTR _cn = (LPCWSTR)cn.utf16(); LPCWSTR _cn = (LPCWSTR)cn.utf16();
WNDCLASSEX wc; WNDCLASSEX wc;
@@ -195,7 +195,7 @@ public:
HWND hwnd = _window ? _window->psHwnd() : nullptr; HWND hwnd = _window ? _window->psHwnd() : nullptr;
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
QString cn = QString("TelegramShadow%1").arg(i); QString cn = QString("KotatogramShadow%1").arg(i);
LPCWSTR _cn = (LPCWSTR)cn.utf16(); LPCWSTR _cn = (LPCWSTR)cn.utf16();
WNDCLASSEX wc; WNDCLASSEX wc;

View File

@@ -119,7 +119,7 @@ namespace {
WCHAR nameBuf[nameBufSize]; WCHAR nameBuf[nameBufSize];
int32 len = GetWindowText(hWnd, nameBuf, nameBufSize); int32 len = GetWindowText(hWnd, nameBuf, nameBufSize);
if (len && len < nameBufSize) { if (len && len < nameBufSize) {
if (QRegularExpression(qsl("^Telegram(\\s*\\(\\d+\\))?$")).match(QString::fromStdWString(nameBuf)).hasMatch()) { if (QRegularExpression(qsl("^Kotatogram(\\s*\\(\\d+\\))?$")).match(QString::fromStdWString(nameBuf)).hasMatch()) {
BOOL res = ::SetForegroundWindow(hWnd); BOOL res = ::SetForegroundWindow(hWnd);
::SetFocus(hWnd); ::SetFocus(hWnd);
return FALSE; return FALSE;
@@ -150,7 +150,7 @@ QString psAppDataPath() {
if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { if (GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) {
QDir appData(QString::fromStdWString(std::wstring(wstrPath))); QDir appData(QString::fromStdWString(std::wstring(wstrPath)));
#ifdef OS_WIN_STORE #ifdef OS_WIN_STORE
return appData.absolutePath() + qsl("/Telegram Desktop UWP/"); return appData.absolutePath() + qsl("/Kotatogram Desktop UWP/");
#else // OS_WIN_STORE #else // OS_WIN_STORE
return appData.absolutePath() + '/' + str_const_toString(AppName) + '/'; return appData.absolutePath() + '/' + str_const_toString(AppName) + '/';
#endif // OS_WIN_STORE #endif // OS_WIN_STORE
@@ -256,10 +256,10 @@ void psDoFixPrevious() {
HRESULT userDesktopRes = SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, userDesktopFolder); HRESULT userDesktopRes = SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, userDesktopFolder);
HRESULT commonDesktopRes = SHGetFolderPath(0, CSIDL_COMMON_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, commonDesktopFolder); HRESULT commonDesktopRes = SHGetFolderPath(0, CSIDL_COMMON_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, commonDesktopFolder);
if (SUCCEEDED(userDesktopRes)) { if (SUCCEEDED(userDesktopRes)) {
userDesktopLnk = QString::fromWCharArray(userDesktopFolder) + "\\Telegram.lnk"; userDesktopLnk = QString::fromWCharArray(userDesktopFolder) + "\\Kotatogram.lnk";
} }
if (SUCCEEDED(commonDesktopRes)) { if (SUCCEEDED(commonDesktopRes)) {
commonDesktopLnk = QString::fromWCharArray(commonDesktopFolder) + "\\Telegram.lnk"; commonDesktopLnk = QString::fromWCharArray(commonDesktopFolder) + "\\Kotatogram.lnk";
} }
QFile userDesktopFile(userDesktopLnk), commonDesktopFile(commonDesktopLnk); QFile userDesktopFile(userDesktopLnk), commonDesktopFile(commonDesktopLnk);
if (QFile::exists(userDesktopLnk) && QFile::exists(commonDesktopLnk) && userDesktopLnk != commonDesktopLnk) { if (QFile::exists(userDesktopLnk) && QFile::exists(commonDesktopLnk) && userDesktopLnk != commonDesktopLnk) {
@@ -565,11 +565,11 @@ void _manageAppLnk(bool create, bool silent, int path_csidl, const wchar_t *args
} }
void psAutoStart(bool start, bool silent) { void psAutoStart(bool start, bool silent) {
_manageAppLnk(start, silent, CSIDL_STARTUP, L"-autostart", L"Telegram autorun link.\nYou can disable autorun in Telegram settings."); _manageAppLnk(start, silent, CSIDL_STARTUP, L"-autostart", L"Kotatogram autorun link.\nYou can disable autorun in Kotatogram settings.");
} }
void psSendToMenu(bool send, bool silent) { void psSendToMenu(bool send, bool silent) {
_manageAppLnk(send, silent, CSIDL_SENDTO, L"-sendpath", L"Telegram send to link.\nYou can disable send to menu item in Telegram settings."); _manageAppLnk(send, silent, CSIDL_SENDTO, L"-sendpath", L"Kotatogram send to link.\nYou can disable send to menu item in Kotatogram settings.");
} }
void psUpdateOverlayed(TWidget *widget) { void psUpdateOverlayed(TWidget *widget) {

View File

@@ -26,11 +26,11 @@ const PROPERTYKEY pkey_AppUserModel_ID = { { 0x9F4C2855, 0x9F79, 0x4B39, { 0xA8,
const PROPERTYKEY pkey_AppUserModel_StartPinOption = { { 0x9F4C2855, 0x9F79, 0x4B39, { 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3 } }, 12 }; const PROPERTYKEY pkey_AppUserModel_StartPinOption = { { 0x9F4C2855, 0x9F79, 0x4B39, { 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3 } }, 12 };
#ifdef OS_WIN_STORE #ifdef OS_WIN_STORE
const WCHAR AppUserModelIdRelease[] = L"Telegram.TelegramDesktop.Store"; const WCHAR AppUserModelIdRelease[] = L"Kotatogram.KotatogramDesktop.Store";
#else // OS_WIN_STORE #else // OS_WIN_STORE
const WCHAR AppUserModelIdRelease[] = L"Telegram.TelegramDesktop"; const WCHAR AppUserModelIdRelease[] = L"Kotatogram.KotatogramDesktop";
#endif // OS_WIN_STORE #endif // OS_WIN_STORE
const WCHAR AppUserModelIdAlpha[] = L"Telegram.TelegramDesktop.Alpha"; const WCHAR AppUserModelIdAlpha[] = L"Kotatogram.KotatogramDesktop.Alpha";
} // namespace } // namespace
@@ -163,7 +163,7 @@ QString systemShortcutPath() {
void cleanupShortcut() { void cleanupShortcut() {
static const int maxFileLen = MAX_PATH * 10; static const int maxFileLen = MAX_PATH * 10;
QString path = systemShortcutPath() + qsl("Telegram.lnk"); QString path = systemShortcutPath() + qsl("Kotatogram.lnk");
std::wstring p = QDir::toNativeSeparators(path).toStdWString(); std::wstring p = QDir::toNativeSeparators(path).toStdWString();
DWORD attributes = GetFileAttributes(p.c_str()); DWORD attributes = GetFileAttributes(p.c_str());
@@ -253,11 +253,10 @@ bool validateShortcut() {
if (path.isEmpty() || cExeName().isEmpty()) return false; if (path.isEmpty() || cExeName().isEmpty()) return false;
if (cAlphaVersion()) { if (cAlphaVersion()) {
path += qsl("TelegramAlpha.lnk"); path += qsl("KotatogramAlpha.lnk");
if (validateShortcutAt(path)) return true; if (validateShortcutAt(path)) return true;
} else { } else {
if (validateShortcutAt(path + qsl("Kotatogram Desktop/Telegram.lnk"))) return true; if (validateShortcutAt(path + qsl("Kotatogram Desktop/Kotatogram.lnk"))) return true;
//if (validateShortcutAt(path + qsl("Telegram Win (Unofficial)/Telegram.lnk"))) return true;
path += qsl("Kotatogram.lnk"); path += qsl("Kotatogram.lnk");
if (validateShortcutAt(path)) return true; if (validateShortcutAt(path)) return true;

View File

@@ -123,7 +123,7 @@ MainWindow::MainWindow(not_null<Controller*> controller)
, _positionUpdatedTimer([=] { savePosition(); }) , _positionUpdatedTimer([=] { savePosition(); })
, _outdated(CreateOutdatedBar(this)) , _outdated(CreateOutdatedBar(this))
, _body(this) , _body(this)
, _titleText(qsl("Telegram")) { , _titleText(qsl("Kotatogram")) {
subscribe(Theme::Background(), [=]( subscribe(Theme::Background(), [=](
const Theme::BackgroundUpdate &data) { const Theme::BackgroundUpdate &data) {
if (data.paletteChanged()) { if (data.paletteChanged()) {
@@ -500,7 +500,7 @@ void MainWindow::updateUnreadCounter() {
const auto counter = account().sessionExists() const auto counter = account().sessionExists()
? account().session().data().unreadBadge() ? account().session().data().unreadBadge()
: 0; : 0;
_titleText = (counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram"); _titleText = (counter > 0) ? qsl("Kotatogram (%1)").arg(counter) : qsl("Kotatogram");
unreadCounterChangedHook(); unreadCounterChangedHook();
} }