Added dividers to settings of group call with RTMP info.

This commit is contained in:
23rd 2022-03-01 11:47:34 +03:00
parent e44961e571
commit 789c829bc2
3 changed files with 19 additions and 7 deletions

View file

@ -1401,3 +1401,4 @@ groupCallRtmpShowButtonPosition: point(21px, -5px);
groupCallRtmpKeyLabel: FlatLabel(boxLabel) { groupCallRtmpKeyLabel: FlatLabel(boxLabel) {
minWidth: 230px; minWidth: 230px;
} }
groupCallDividerBg: groupCallMembersBgRipple;

View file

@ -278,9 +278,7 @@ void StartRtmpProcess::FillRtmpRows(
auto urlLabelContent = state->url.value(); auto urlLabelContent = state->url.value();
addLabel(std::move(urlLabelContent)); addLabel(std::move(urlLabelContent));
container->add(object_ptr<Ui::FixedHeightWidget>( Settings::AddSkip(container, st::groupCallRtmpUrlSkip);
container,
st::groupCallRtmpUrlSkip));
addButton(false, tr::lng_group_call_rtmp_url_copy()); addButton(false, tr::lng_group_call_rtmp_url_copy());
// //
@ -289,9 +287,7 @@ void StartRtmpProcess::FillRtmpRows(
} }
// Stream Key. // Stream Key.
container->add(object_ptr<Ui::FixedHeightWidget>( Settings::AddSkip(container, st::groupCallRtmpKeySubsectionTitleSkip);
container,
st::groupCallRtmpKeySubsectionTitleSkip));
Settings::AddSubsectionTitle( Settings::AddSubsectionTitle(
container, container,

View file

@ -248,6 +248,14 @@ void SettingsBox(
const auto joinMuted = goodReal ? real->joinMuted() : false; const auto joinMuted = goodReal ? real->joinMuted() : false;
const auto canChangeJoinMuted = (goodReal && real->canChangeJoinMuted()); const auto canChangeJoinMuted = (goodReal && real->canChangeJoinMuted());
const auto addCheck = (peer->canManageGroupCall() && canChangeJoinMuted); const auto addCheck = (peer->canManageGroupCall() && canChangeJoinMuted);
const auto addDivider = [&] {
layout->add(object_ptr<Ui::BoxContentDivider>(
layout,
st::boxDividerHeight,
st::groupCallDividerBg));
};
if (addCheck) { if (addCheck) {
AddSkip(layout); AddSkip(layout);
} }
@ -629,6 +637,10 @@ void SettingsBox(
)->addClickHandler(std::move(shareLink)); )->addClickHandler(std::move(shareLink));
} }
if (rtmp) { if (rtmp) {
AddSkip(layout);
addDivider();
AddSkip(layout);
struct State { struct State {
base::unique_qptr<Ui::PopupMenu> menu; base::unique_qptr<Ui::PopupMenu> menu;
mtpRequestId requestId; mtpRequestId requestId;
@ -699,7 +711,7 @@ void SettingsBox(
StartRtmpProcess::FillRtmpRows( StartRtmpProcess::FillRtmpRows(
box->verticalLayout(), layout,
false, false,
[=](object_ptr<Ui::BoxContent> &&object) { [=](object_ptr<Ui::BoxContent> &&object) {
box->getDelegate()->show(std::move(object)); box->getDelegate()->show(std::move(object));
@ -716,6 +728,9 @@ void SettingsBox(
&st::groupCallAttentionBoxButton, &st::groupCallAttentionBoxButton,
&st::groupCallPopupMenu); &st::groupCallPopupMenu);
state->data.fire(call->rtmpInfo()); state->data.fire(call->rtmpInfo());
addDivider();
AddSkip(layout);
} }
if (peer->canManageGroupCall()) { if (peer->canManageGroupCall()) {