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

Method updateDescText

Telegram/SourceFiles/intro/intro_code.cpp:83–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void CodeWidget::updateDescText() {
84 const auto byTelegram = getData()->codeByTelegram;
85 const auto isFragment = !getData()->codeByFragmentUrl.isEmpty();
86 _isFragment = isFragment;
87 const auto emailPattern = !getData()->emailPatternSetup.isEmpty()
88 ? getData()->emailPatternSetup
89 : getData()->emailPatternLogin;
90 setDescriptionText(!emailPattern.isEmpty()
91 ? tr::lng_intro_email_confirm_subtitle(
92 lt_email,
93 rpl::single(Ui::Text::WrapEmailPattern(emailPattern)),
94 tr::marked)
95 : isFragment
96 ? tr::lng_intro_fragment_about(
97 lt_phone_number,
98 rpl::single(
99 TextWithEntities::Simple(Ui::FormatPhone(getData()->phone))),
100 tr::rich)
101 : (byTelegram ? tr::lng_code_from_telegram : tr::lng_code_desc)(
102 tr::rich));
103 if (getData()->codeByTelegram) {
104 _noTelegramCode->show();
105 _callTimer.cancel();
106 } else {
107 _noTelegramCode->hide();
108 _callStatus = getData()->callStatus;
109 _callTimeout = getData()->callTimeout;
110 if (_callStatus == CallStatus::Waiting && !_callTimer.isActive()) {
111 _callTimer.callEach(1000);
112 }
113 }
114 updateCallText();
115}
116
117void CodeWidget::updateCallText() {
118 auto text = ([this]() -> QString {

Callers

nothing calls this directly

Calls 7

SimpleClass · 0.85
FormatPhoneFunction · 0.85
isEmptyMethod · 0.45
showMethod · 0.45
cancelMethod · 0.45
hideMethod · 0.45
isActiveMethod · 0.45

Tested by

no test coverage detected