Add flatpak and snap update URLs
This commit is contained in:
parent
03c2fc2c48
commit
12a77cffd8
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#include "core/update_checker.h"
|
#include "core/update_checker.h"
|
||||||
|
|
||||||
|
#include "platform/platform_specific.h"
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/platform/base_platform_file_utilities.h"
|
#include "base/platform/base_platform_file_utilities.h"
|
||||||
#include "base/timer.h"
|
#include "base/timer.h"
|
||||||
|
@ -1575,9 +1576,16 @@ void UpdateApplication() {
|
||||||
return "https://www.microsoft.com/en-us/store/p/telegram-desktop/9nztwsqntd0s";
|
return "https://www.microsoft.com/en-us/store/p/telegram-desktop/9nztwsqntd0s";
|
||||||
#elif defined OS_MAC_STORE // OS_WIN_STORE
|
#elif defined OS_MAC_STORE // OS_WIN_STORE
|
||||||
return "https://itunes.apple.com/ae/app/telegram-desktop/id946399090";
|
return "https://itunes.apple.com/ae/app/telegram-desktop/id946399090";
|
||||||
#else // OS_WIN_STORE || OS_MAC_STORE
|
#elif defined Q_OS_UNIX && !defined Q_OS_MAC // OS_WIN_STORE || OS_MAC_STORE
|
||||||
|
if (Platform::InFlatpak()) {
|
||||||
|
return "https://flathub.org/apps/details/org.telegram.desktop";
|
||||||
|
} else if (Platform::InSnap()) {
|
||||||
|
return "https://snapcraft.io/telegram-desktop";
|
||||||
|
}
|
||||||
return "https://desktop.telegram.org";
|
return "https://desktop.telegram.org";
|
||||||
#endif // OS_WIN_STORE || OS_MAC_STORE
|
#else // OS_WIN_STORE || OS_MAC_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
|
return "https://desktop.telegram.org";
|
||||||
|
#endif // OS_WIN_STORE || OS_MAC_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
}();
|
}();
|
||||||
UrlClickHandler::Open(url);
|
UrlClickHandler::Open(url);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mtproto/mtproto_rpc_sender.h"
|
#include "mtproto/mtproto_rpc_sender.h"
|
||||||
#include "mtproto/mtproto_dc_options.h"
|
#include "mtproto/mtproto_dc_options.h"
|
||||||
#include "mtproto/connection_abstract.h"
|
#include "mtproto/connection_abstract.h"
|
||||||
|
#include "platform/platform_specific.h"
|
||||||
#include "base/openssl_help.h"
|
#include "base/openssl_help.h"
|
||||||
#include "base/qthelp_url.h"
|
#include "base/qthelp_url.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
@ -637,9 +638,20 @@ void SessionPrivate::tryToSend() {
|
||||||
#elif defined OS_WIN_STORE // OS_MAC_STORE
|
#elif defined OS_WIN_STORE // OS_MAC_STORE
|
||||||
const auto appVersion = QString::fromLatin1(AppVersionStr)
|
const auto appVersion = QString::fromLatin1(AppVersionStr)
|
||||||
+ " win store";
|
+ " win store";
|
||||||
#else // OS_MAC_STORE || OS_WIN_STORE
|
#elif defined Q_OS_UNIX && !defined Q_OS_MAC // OS_MAC_STORE || OS_WIN_STORE
|
||||||
|
const auto appVersion = [] {
|
||||||
|
if (Platform::InFlatpak()) {
|
||||||
|
return QString::fromLatin1(AppVersionStr)
|
||||||
|
+ " flatpak";
|
||||||
|
} else if (Platform::InSnap()) {
|
||||||
|
return QString::fromLatin1(AppVersionStr)
|
||||||
|
+ " snap";
|
||||||
|
}
|
||||||
|
return QString::fromLatin1(AppVersionStr);
|
||||||
|
}();
|
||||||
|
#else // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
const auto appVersion = QString::fromLatin1(AppVersionStr);
|
const auto appVersion = QString::fromLatin1(AppVersionStr);
|
||||||
#endif // OS_MAC_STORE || OS_WIN_STORE
|
#endif // OS_MAC_STORE || OS_WIN_STORE || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
||||||
const auto proxyType = _options->proxy.type;
|
const auto proxyType = _options->proxy.type;
|
||||||
const auto mtprotoProxy = (proxyType == ProxyData::Type::Mtproto);
|
const auto mtprotoProxy = (proxyType == ProxyData::Type::Mtproto);
|
||||||
const auto clientProxyFields = mtprotoProxy
|
const auto clientProxyFields = mtprotoProxy
|
||||||
|
|
Loading…
Reference in New Issue