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

Method checkUpdateStatus

Telegram/SourceFiles/intro/intro_widget.cpp:312–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void Widget::checkUpdateStatus() {
313 Expects(!Core::UpdaterDisabled());
314
315 if (Core::UpdateChecker().state() == Core::UpdateChecker::State::Ready) {
316 if (_update) return;
317 _update.create(
318 this,
319 object_ptr<Ui::RoundButton>(
320 this,
321 tr::lng_menu_update(),
322 st::defaultBoxButton));
323 _update->entity()->setTextTransform(Ui::RoundButtonTextTransform::ToUpper);
324 if (!_showAnimation) {
325 _update->setVisible(true);
326 }
327 const auto stepHasCover = getStep()->hasCover();
328 _update->toggle(!stepHasCover, anim::type::instant);
329 _update->entity()->setClickedCallback([] {
330 Core::checkReadyUpdate();
331 Core::Restart();
332 });
333 } else {
334 if (!_update) return;
335 _update.destroy();
336 }
337 updateControlsGeometry();
338}
339
340void Widget::setInnerFocus() {
341 if (getStep()->animating()) {

Callers

nothing calls this directly

Calls 10

UpdaterDisabledFunction · 0.85
checkReadyUpdateFunction · 0.85
hasCoverMethod · 0.80
UpdateCheckerClass · 0.50
RestartFunction · 0.50
stateMethod · 0.45
createMethod · 0.45
setVisibleMethod · 0.45
toggleMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected