2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Add support for requesting deep link info.

Also update API scheme.
Also remove auth.checkPhone requests.
This commit is contained in:
John Preston
2018-04-18 19:42:02 +04:00
parent 46af87a00a
commit 67e698a374
16 changed files with 153 additions and 4 deletions

View File

@@ -14,6 +14,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/localstorage.h"
#include "messenger.h"
#include "mtproto/session.h"
#include "mainwindow.h"
#include "core/click_handler_types.h"
#include "settings/settings_widget.h"
#include <openssl/rsa.h>
#include <openssl/pem.h>
@@ -2094,6 +2097,34 @@ bool checkReadyUpdate() {
return true;
}
void UpdateApplication() {
cSetLastUpdateCheck(0);
Core::UpdateChecker().start();
if (const auto window = App::wnd()) {
auto settings = Box<Settings::Widget>();
const auto weak = make_weak(settings.data());
window->showSpecialLayer(std::move(settings), anim::type::normal);
if (weak) {
weak->scrollToUpdateRow();
}
}
}
#else // !TDESKTOP_DISABLE_AUTOUPDATE
void UpdateApplication() {
const auto url = [&] {
#ifdef OS_WIN_STORE
return "https://www.microsoft.com/en-us/store/p/telegram-desktop/9nztwsqntd0s";
#elif defined OS_MAC_STORE // OS_WIN_STORE
return "https://itunes.apple.com/ae/app/telegram-desktop/id946399090";
#else // OS_WIN_STORE || OS_MAC_STORE
return "https://desktop.telegram.org";
#endif // OS_WIN_STORE || OS_MAC_STORE
}();
UrlClickHandler::doOpen(url);
}
#endif // !TDESKTOP_DISABLE_AUTOUPDATE
QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp

View File

@@ -60,6 +60,7 @@ class UpdateChecker {
#endif // TDESKTOP_DISABLE_AUTOUPDATE
void UpdateApplication();
QString countBetaVersionSignature(uint64 version);
} // namespace Core