2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Make count-depended button texts in filter links.

This commit is contained in:
John Preston
2023-04-23 18:00:18 +04:00
parent cb1041a289
commit c1a63164c0
2 changed files with 10 additions and 4 deletions

View File

@@ -372,13 +372,17 @@ object_ptr<RoundButton> FilterLinkProcessButton(
case FilterLinkHeaderType::AddingChats:
return badge.isEmpty()
? tr::lng_filters_by_link_join_no() | with(QString())
: tr::lng_filters_by_link_join_button() | with(badge);
: tr::lng_filters_by_link_and_join_button(
lt_count,
rpl::single(float64(count))) | with(badge);
case FilterLinkHeaderType::AllAdded:
return tr::lng_box_ok() | with(QString());
case FilterLinkHeaderType::Removing:
return badge.isEmpty()
? tr::lng_filters_by_link_remove_button() | with(QString())
: tr::lng_filters_by_link_quit_button() | with(badge);
: tr::lng_filters_by_link_and_quit_button(
lt_count,
rpl::single(float64(count))) | with(badge);
}
Unexpected("Type in FilterLinkProcessButton.");
}) | rpl::flatten_latest();