MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / UpdateApplication

Function UpdateApplication

Telegram/SourceFiles/core/update_checker.cpp:1879–1918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1877}
1878
1879void UpdateApplication() {
1880 if (UpdaterDisabled()) {
1881 const auto url = [&] {
1882#ifdef OS_WIN_STORE
1883 return "https://www.microsoft.com/en-us/store/p/telegram-desktop/9nztwsqntd0s";
1884#elif defined OS_MAC_STORE // OS_WIN_STORE
1885 return "https://itunes.apple.com/ae/app/telegram-desktop/id946399090";
1886#else // OS_WIN_STORE || OS_MAC_STORE
1887 if (KSandbox::isFlatpak()) {
1888 return "https://flathub.org/apps/details/io.github.tdesktop_x64.TDesktop";
1889 } else if (KSandbox::isSnap()) {
1890 return "https://snapcraft.io/telegram-desktop";
1891 }
1892 return "https://desktop.telegram.org";
1893#endif // OS_WIN_STORE || OS_MAC_STORE
1894 }();
1895 UrlClickHandler::Open(url);
1896 } else {
1897 cSetAutoUpdate(true);
1898 const auto window = Core::IsAppLaunched()
1899 ? Core::App().activePrimaryWindow()
1900 : nullptr;
1901 if (window) {
1902 if (const auto controller = window->sessionController()) {
1903 controller->showSection(
1904 std::make_shared<Info::Memento>(
1905 Info::Settings::Tag{ controller->session().user() },
1906 ::Settings::AdvancedId()),
1907 Window::SectionShow());
1908 } else {
1909 window->widget()->showSpecialLayer(
1910 Box<::Settings::LayerWidget>(window),
1911 anim::type::normal);
1912 }
1913 window->widget()->showFromTray();
1914 }
1915 cSetLastUpdateCheck(0);
1916 Core::UpdateChecker().start();
1917 }
1918}
1919
1920QString countAlphaVersionSignature(uint64 version) { // duplicated in packer.cpp
1921 if (cAlphaPrivateKey().isEmpty()) {

Callers 6

setupMethod · 0.85
gotPasswordMethod · 0.85
HandleUnknownFunction · 0.85
showUpdateAppBoxMethod · 0.85

Calls 15

UpdaterDisabledFunction · 0.85
IsAppLaunchedFunction · 0.85
AppClass · 0.85
AdvancedIdFunction · 0.85
activePrimaryWindowMethod · 0.80
showFromTrayMethod · 0.80
UpdateCheckerClass · 0.70
SectionShowClass · 0.50
sessionControllerMethod · 0.45
showSectionMethod · 0.45
userMethod · 0.45
sessionMethod · 0.45

Tested by

no test coverage detected