diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index a53623bee..4fb274e6e 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1961,7 +1961,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_group_call_ptt_delay_s" = "{amount}s"; "lng_group_call_ptt_delay" = "Push to Talk release delay: {delay}"; "lng_group_call_share" = "Share Invite Link"; -"lng_group_call_share_listener" = "Mute joined by this link"; +"lng_group_call_share_speaker" = "Users with this link can speak"; +"lng_group_call_copy_speaker_link" = "Copy Speaker Link"; +"lng_group_call_copy_listener_link" = "Copy Listener Link"; "lng_group_call_end" = "End Voice Chat"; "lng_group_call_join" = "Join"; "lng_group_call_invite_done_user" = "You invited {user} to the voice chat."; diff --git a/Telegram/SourceFiles/boxes/share_box.cpp b/Telegram/SourceFiles/boxes/share_box.cpp index 40dcb3ac5..3be01afd2 100644 --- a/Telegram/SourceFiles/boxes/share_box.cpp +++ b/Telegram/SourceFiles/boxes/share_box.cpp @@ -173,6 +173,9 @@ ShareBox::ShareBox(QWidget*, Descriptor &&descriptor) tr::lng_photos_comment()), st::shareCommentPadding) , _bottomWidget(std::move(_descriptor.bottomWidget)) +, _copyLinkText(_descriptor.copyLinkText + ? std::move(_descriptor.copyLinkText) + : tr::lng_share_copy_link()) , _searchTimer([=] { searchByUsername(); }) { if (_bottomWidget) { _bottomWidget->setParent(this); @@ -452,7 +455,7 @@ void ShareBox::createButtons() { [=] { submitSilent(); }, [=] { submitScheduled(); }); } else if (_descriptor.copyCallback) { - addButton(tr::lng_share_copy_link(), [=] { copyLink(); }); + addButton(_copyLinkText.value(), [=] { copyLink(); }); } addButton(tr::lng_cancel(), [=] { closeBox(); }); } diff --git a/Telegram/SourceFiles/boxes/share_box.h b/Telegram/SourceFiles/boxes/share_box.h index 487b598a6..fc262b2cc 100644 --- a/Telegram/SourceFiles/boxes/share_box.h +++ b/Telegram/SourceFiles/boxes/share_box.h @@ -75,6 +75,7 @@ public: Fn)> initSpellchecker; Fn)> initEditLink; object_ptr bottomWidget = { nullptr }; + rpl::producer copyLinkText; const style::MultiSelect *stMultiSelect = nullptr; const style::InputField *stComment = nullptr; const style::PeerList *st = nullptr; @@ -129,6 +130,7 @@ private: QPointer _inner; bool _hasSelected = false; + rpl::variable _copyLinkText; base::Timer _searchTimer; QString _peopleQuery; diff --git a/Telegram/SourceFiles/calls/calls_group_settings.cpp b/Telegram/SourceFiles/calls/calls_group_settings.cpp index eacec9355..8c2abe147 100644 --- a/Telegram/SourceFiles/calls/calls_group_settings.cpp +++ b/Telegram/SourceFiles/calls/calls_group_settings.cpp @@ -106,13 +106,13 @@ object_ptr ShareInviteLinkBox( nullptr, object_ptr( 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 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 }); diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index 001d9c36b..7fccdee1b 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit 001d9c36b029094b18049198b830acc9969bae3c +Subproject commit 7fccdee1bb669225bbdbb3db127163e71bf7fad0