Skip to content

Commit 7261f58

Browse files
committed
Merge tdesktop v6.3.9
1 parent 52eb039 commit 7261f58

235 files changed

Lines changed: 1879 additions & 1742 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Telegram/Resources/langs/lang.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,7 @@ https://github.com/fajox1/fagramdesktop/blob/master/LEGAL
796796
"lng_settings_channel_label" = "Personal channel";
797797
"lng_settings_channel_add" = "Add";
798798
"lng_settings_channel_remove" = "Remove";
799+
"lng_settings_channel_menu_remove" = "Remove Personal Channel";
799800
"lng_settings_channel_no_yet" = "You don't have any public channels yet.";
800801
"lng_settings_channel_start" = "Start a Channel";
801802
"lng_settings_channel_saved" = "Your personal channel was updated.";
@@ -5178,6 +5179,7 @@ https://github.com/fajox1/fagramdesktop/blob/master/LEGAL
51785179
"lng_edit_channel_status_about" = "Choose a status that will be shown next to the channel's name.";
51795180
"lng_edit_channel_status_group" = "Set Group Emoji Status";
51805181
"lng_edit_channel_status_about_group" = "Choose a status that will be shown next to the group's name.";
5182+
"lng_edit_channel_personal_channel" = "Set as Personal Channel";
51815183
"lng_edit_self_title" = "Edit your name";
51825184
"lng_confirm_contact_data" = "New Contact";
51835185
"lng_add_contact" = "Create";

Telegram/SourceFiles/api/api_bot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void SendBotCallbackDataWithPassword(
218218
session,
219219
tr::lng_bots_password_confirm_check_about(
220220
tr::now,
221-
Ui::Text::WithEntities));
221+
tr::marked));
222222
if (box) {
223223
show->showBox(std::move(box), Ui::LayerOption::CloseOther);
224224
} else {

Telegram/SourceFiles/api/api_chat_filters.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,24 @@ class ToggleChatsController final
116116
tr::now,
117117
lt_folder,
118118
std::move(boldTitle),
119-
Ui::Text::WithEntities)
119+
tr::marked)
120120
: (type == Type::AddingChats)
121121
? tr::lng_filters_by_link_more_sure(
122122
tr::now,
123123
lt_folder,
124124
std::move(boldTitle),
125-
Ui::Text::WithEntities)
125+
tr::marked)
126126
: (type == Type::AllAdded)
127127
? tr::lng_filters_by_link_already_about(
128128
tr::now,
129129
lt_folder,
130130
std::move(boldTitle),
131-
Ui::Text::WithEntities)
131+
tr::marked)
132132
: tr::lng_filters_by_link_remove_sure(
133133
tr::now,
134134
lt_folder,
135135
std::move(boldTitle),
136-
Ui::Text::WithEntities);
136+
tr::marked);
137137
}
138138

139139
void InitFilterLinkHeader(
@@ -547,7 +547,7 @@ void ShowImportToast(
547547
? tr::lng_filters_added_title
548548
: tr::lng_filters_updated_title;
549549
auto text = Ui::Text::Wrapped(
550-
phrase(tr::now, lt_folder, title.text, Ui::Text::WithEntities),
550+
phrase(tr::now, lt_folder, title.text, tr::marked),
551551
EntityType::Bold);
552552
if (added > 0) {
553553
const auto phrase = created

Telegram/SourceFiles/api/api_chat_invite.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ void ConfirmSubscriptionBox(
224224
box,
225225
tr::lng_channel_invite_subscription_about(
226226
lt_channel,
227-
rpl::single(Ui::Text::Bold(name)),
227+
rpl::single(tr::bold(name)),
228228
lt_price,
229229
tr::lng_credits_summary_options_credits(
230230
lt_count,
231231
rpl::single(amount) | tr::to_count(),
232-
Ui::Text::Bold),
233-
Ui::Text::WithEntities),
232+
tr::bold),
233+
tr::marked),
234234
st::inviteLinkSubscribeBoxAbout),
235235
style::al_top);
236236
Ui::AddSkip(content);
@@ -243,9 +243,9 @@ void ConfirmSubscriptionBox(
243243
tr::lng_paid_react_agree_link(),
244244
tr::lng_group_invite_subscription_about_url()
245245
) | rpl::map([](const QString &text, const QString &url) {
246-
return Ui::Text::Link(text, url);
246+
return tr::link(text, url);
247247
}),
248-
Ui::Text::RichLangValue),
248+
tr::rich),
249249
st::inviteLinkSubscribeBoxTerms),
250250
style::al_top);
251251

Telegram/SourceFiles/api/api_suggest_post.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ void ConfirmApproval(
154154
? tr::lng_suggest_accept_text(
155155
tr::now,
156156
lt_from,
157-
Ui::Text::Bold(item->from()->shortName()),
158-
Ui::Text::WithEntities)
157+
tr::bold(item->from()->shortName()),
158+
tr::marked)
159159
: tr::lng_suggest_accept_text_to(
160160
tr::now,
161161
lt_channel,
162-
Ui::Text::Bold(channelName),
163-
Ui::Text::WithEntities);
162+
tr::bold(channelName),
163+
tr::marked);
164164
if (price) {
165165
text.append("\n\n").append(admin
166166
? (scheduleDate
@@ -171,23 +171,23 @@ void ConfirmApproval(
171171
lt_count_decimal,
172172
amount.value(),
173173
lt_channel,
174-
Ui::Text::Bold(channelName),
174+
tr::bold(channelName),
175175
lt_percent,
176176
TextWithEntities{ commission },
177177
lt_date,
178-
Ui::Text::Bold(date),
179-
Ui::Text::RichLangValue)
178+
tr::bold(date),
179+
tr::rich)
180180
: (amount.stars()
181181
? tr::lng_suggest_accept_receive_now_stars
182182
: tr::lng_suggest_accept_receive_now_ton)(
183183
tr::now,
184184
lt_count_decimal,
185185
amount.value(),
186186
lt_channel,
187-
Ui::Text::Bold(channelName),
187+
tr::bold(channelName),
188188
lt_percent,
189189
TextWithEntities{ commission },
190-
Ui::Text::RichLangValue))
190+
tr::rich))
191191
: (scheduleDate
192192
? (amount.stars()
193193
? tr::lng_suggest_accept_pay_stars
@@ -196,25 +196,25 @@ void ConfirmApproval(
196196
lt_count_decimal,
197197
amount.value(),
198198
lt_date,
199-
Ui::Text::Bold(date),
200-
Ui::Text::RichLangValue)
199+
tr::bold(date),
200+
tr::rich)
201201
: (amount.stars()
202202
? tr::lng_suggest_accept_pay_now_stars
203203
: tr::lng_suggest_accept_pay_now_ton)(
204204
tr::now,
205205
lt_count_decimal,
206206
amount.value(),
207-
Ui::Text::RichLangValue)));
207+
tr::rich)));
208208
if (admin) {
209209
text.append(' ').append(
210210
tr::lng_suggest_accept_receive_if(
211211
tr::now,
212-
Ui::Text::RichLangValue));
212+
tr::rich));
213213
if (price.stars()) {
214214
text.append("\n\n").append(
215215
tr::lng_suggest_options_stars_warning(
216216
tr::now,
217-
Ui::Text::RichLangValue));
217+
tr::rich));
218218
}
219219
}
220220
}
@@ -321,12 +321,12 @@ void RequestDeclineComment(
321321
.text = (admin
322322
? tr::lng_suggest_decline_text(
323323
lt_from,
324-
rpl::single(Ui::Text::Bold(item->from()->shortName())),
325-
Ui::Text::WithEntities)
324+
rpl::single(tr::bold(item->from()->shortName())),
325+
tr::marked)
326326
: tr::lng_suggest_decline_text_to(
327327
lt_channel,
328-
rpl::single(Ui::Text::Bold(channelName)),
329-
Ui::Text::WithEntities)),
328+
rpl::single(tr::bold(channelName)),
329+
tr::marked)),
330330
.confirmed = [=](Fn<void()> close) { (*callback)(); close(); },
331331
.confirmText = tr::lng_suggest_action_decline(),
332332
.confirmStyle = &st::attentionBoxButton,

Telegram/SourceFiles/apiwrap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ void ApiWrap::sendMessageFail(
490490
PeerFloodErrorText(&session(), PeerFloodType::Send)),
491491
Ui::LayerOption::CloseOther);
492492
} else if (show && error == u"USER_BANNED_IN_CHANNEL"_q) {
493-
const auto link = Ui::Text::Link(
493+
const auto link = tr::link(
494494
tr::lng_cant_more_info(tr::now),
495495
session().createInternalLinkFull(u"spambot"_q));
496496
show->showBox(
@@ -499,7 +499,7 @@ void ApiWrap::sendMessageFail(
499499
tr::now,
500500
lt_more_info,
501501
link,
502-
Ui::Text::WithEntities)),
502+
tr::marked)),
503503
Ui::LayerOption::CloseOther);
504504
} else if (error.startsWith(u"SLOWMODE_WAIT_"_q)) {
505505
const auto chop = u"SLOWMODE_WAIT_"_q.size();

Telegram/SourceFiles/boxes/about_box.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,28 @@ namespace {
4343
rpl::producer<TextWithEntities> Text1() {
4444
return tr::lng_fa_about_text1(
4545
lt_api_link,
46-
tr::lng_fa_about_text1_api(
47-
) | Ui::Text::ToLink("https://core.telegram.org/api"),
48-
Ui::Text::WithEntities);
46+
tr::lng_fa_about_text1_api(tr::url(u"https://core.telegram.org/api"_q)),
47+
tr::marked);
4948
}
5049

5150
rpl::producer<TextWithEntities> Text2() {
5251
return tr::lng_fa_about_text2(
5352
lt_gpl_link,
54-
rpl::single(Ui::Text::Link(
53+
rpl::single(tr::link(
5554
"GNU GPL",
5655
"https://github.com/burhancodes/fagramdesktop/blob/master/LICENSE")),
5756
lt_github_link,
58-
rpl::single(Ui::Text::Link(
57+
rpl::single(tr::link(
5958
"GitHub",
6059
"https://github.com/burhancodes/fagramdesktop")),
61-
Ui::Text::WithEntities);
60+
tr::marked);
6261
}
6362

6463
rpl::producer<TextWithEntities> Text3() {
6564
return tr::lng_fa_about_text3(
6665
lt_faq_link,
67-
tr::lng_about_text3_faq() | Ui::Text::ToLink(telegramFaqLink()),
68-
Ui::Text::WithEntities);
66+
tr::lng_about_text3_faq(tr::url(telegramFaqLink())),
67+
tr::marked);
6968
}
7069

7170
} // namespace
@@ -226,11 +225,11 @@ void ArchiveHintBox(
226225
lt_emoji,
227226
rpl::single(
228227
Ui::Text::IconEmoji(&st::textMoreIconEmoji)),
229-
Ui::Text::RichLangValue
228+
tr::rich
230229
) | rpl::map([](TextWithEntities text) {
231-
return Ui::Text::Link(std::move(text), 1);
230+
return tr::link(std::move(text), 1);
232231
}),
233-
Ui::Text::RichLangValue),
232+
tr::rich),
234233
st::channelEarnHistoryRecipientLabel));
235234
label->resizeToWidth(box->width()
236235
- rect::m::sum::h(st::boxRowPadding));

Telegram/SourceFiles/boxes/about_sponsored_box.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ void AboutSponsoredBox(not_null<Ui::GenericBox*> box) {
6161
tr::lng_sponsored_info_description1_link(),
6262
tr::lng_sponsored_info_description1_url()
6363
) | rpl::map([](const QString &text, const QString &url) {
64-
return Ui::Text::Link(text, url);
64+
return tr::link(text, url);
6565
}),
66-
Ui::Text::RichLangValue);
66+
tr::rich);
6767
box->addRow(object_ptr<FlatLabel>(box, std::move(text1), stLabel));
6868

6969
box->addSkip(st::sponsoredUrlButtonSkip);

Telegram/SourceFiles/boxes/add_contact_box.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void MustBePublicFailed(
160160
TextWithEntities PeerFloodErrorText(
161161
not_null<Main::Session*> session,
162162
PeerFloodType type) {
163-
const auto link = Ui::Text::Link(
163+
const auto link = tr::link(
164164
tr::lng_cant_more_info(tr::now),
165165
session->createInternalLinkFull(u"spambot"_q));
166166
return ((type == PeerFloodType::InviteGroup)
@@ -169,7 +169,7 @@ TextWithEntities PeerFloodErrorText(
169169
tr::now,
170170
lt_more_info,
171171
link,
172-
Ui::Text::WithEntities);
172+
tr::marked);
173173
}
174174

175175
void ShowAddParticipantsError(

Telegram/SourceFiles/boxes/choose_filter_box.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For license and copyright information please follow this link:
2222
#include "ui/filter_icons.h"
2323
#include "ui/painter.h"
2424
#include "ui/rect.h"
25-
#include "ui/text/text_utilities.h" // Ui::Text::Bold
25+
#include "ui/text/text_utilities.h" // tr::bold
2626
#include "ui/toast/toast.h"
2727
#include "ui/widgets/buttons.h"
2828
#include "ui/widgets/menu/menu_action.h"
@@ -179,10 +179,10 @@ void ChangeFilterById(
179179
: tr::lng_filters_toast_remove)(
180180
tr::now,
181181
lt_chat,
182-
Ui::Text::Bold(chat),
182+
tr::bold(chat),
183183
lt_folder,
184184
Ui::Text::Wrapped(name.text, EntityType::Bold),
185-
Ui::Text::WithEntities),
185+
tr::marked),
186186
.textContext = Core::TextContext({
187187
.session = &history->session(),
188188
.customEmojiLoopLimit = isStatic ? -1 : 0,

0 commit comments

Comments
 (0)