2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Improve phrases in share voice chat link box.

This commit is contained in:
John Preston
2021-03-12 22:22:19 +04:00
parent ed4dea2b0e
commit ce84d9c84d
5 changed files with 19 additions and 6 deletions

View File

@@ -106,13 +106,13 @@ object_ptr<ShareBox> ShareInviteLinkBox(
nullptr,
object_ptr<Ui::Checkbox>(
nullptr,
tr::lng_group_call_share_listener(tr::now),
tr::lng_group_call_share_speaker(tr::now),
true,
st::groupCallCheckbox),
st::groupCallShareMutedMargin);
const auto listenerCheckbox = bottom ? bottom->entity() : nullptr;
const auto speakerCheckbox = bottom ? bottom->entity() : nullptr;
const auto currentLink = [=] {
return (!listenerCheckbox || listenerCheckbox->checked())
return (!speakerCheckbox || !speakerCheckbox->checked())
? linkListener
: linkSpeaker;
};
@@ -192,6 +192,12 @@ object_ptr<ShareBox> ShareInviteLinkBox(
.submitCallback = std::move(submitCallback),
.filterCallback = std::move(filterCallback),
.bottomWidget = std::move(bottom),
.copyLinkText = rpl::conditional(
(speakerCheckbox
? speakerCheckbox->checkedValue()
: rpl::single(false)),
tr::lng_group_call_copy_speaker_link(),
tr::lng_group_call_copy_listener_link()),
.stMultiSelect = &st::groupCallMultiSelect,
.stComment = &st::groupCallShareBoxComment,
.st = &st::groupCallShareBoxList });