mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Remove some experimental code.
This commit is contained in:
parent
38506d27a1
commit
90efbf1210
3 changed files with 15 additions and 572 deletions
|
@ -97,34 +97,6 @@ public:
|
||||||
const IconState &state) override;
|
const IconState &state) override;
|
||||||
bool rowIsNarrow() override;
|
bool rowIsNarrow() override;
|
||||||
void rowShowContextMenu(not_null<PeerListRow*> row);
|
void rowShowContextMenu(not_null<PeerListRow*> row);
|
||||||
//void rowPaintNarrowBackground(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// bool selected) override;
|
|
||||||
//void rowPaintNarrowBorder(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// not_null<Row*> row) override;
|
|
||||||
//void rowPaintNarrowShadow(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh) override;
|
|
||||||
|
|
||||||
//int customRowHeight() override;
|
|
||||||
//void customRowPaint(
|
|
||||||
// Painter &p,
|
|
||||||
// crl::time now,
|
|
||||||
// not_null<PeerListRow*> row,
|
|
||||||
// bool selected) override;
|
|
||||||
//bool customRowSelectionPoint(
|
|
||||||
// not_null<PeerListRow*> row,
|
|
||||||
// int x,
|
|
||||||
// int y) override;
|
|
||||||
//Fn<QImage()> customRowRippleMaskGenerator() override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
[[nodiscard]] std::unique_ptr<Row> createRowForMe();
|
[[nodiscard]] std::unique_ptr<Row> createRowForMe();
|
||||||
|
@ -135,7 +107,6 @@ private:
|
||||||
|
|
||||||
[[nodiscard]] bool isMe(not_null<PeerData*> participantPeer) const;
|
[[nodiscard]] bool isMe(not_null<PeerData*> participantPeer) const;
|
||||||
void prepareRows(not_null<Data::GroupCall*> real);
|
void prepareRows(not_null<Data::GroupCall*> real);
|
||||||
//void repaintByTimer();
|
|
||||||
|
|
||||||
[[nodiscard]] base::unique_qptr<Ui::PopupMenu> createRowContextMenu(
|
[[nodiscard]] base::unique_qptr<Ui::PopupMenu> createRowContextMenu(
|
||||||
QWidget *parent,
|
QWidget *parent,
|
||||||
|
@ -167,10 +138,6 @@ private:
|
||||||
not_null<const Data::GroupCallParticipant*> participant) const;
|
not_null<const Data::GroupCallParticipant*> participant) const;
|
||||||
const std::string &computeCameraEndpoint(
|
const std::string &computeCameraEndpoint(
|
||||||
not_null<const Data::GroupCallParticipant*> participant) const;
|
not_null<const Data::GroupCallParticipant*> participant) const;
|
||||||
//void setRowVideoEndpoint(
|
|
||||||
// not_null<Row*> row,
|
|
||||||
// const std::string &endpoint);
|
|
||||||
bool toggleRowVideo(not_null<PeerListRow*> row);
|
|
||||||
void showRowMenu(not_null<PeerListRow*> row, bool highlightRow);
|
void showRowMenu(not_null<PeerListRow*> row, bool highlightRow);
|
||||||
|
|
||||||
void toggleVideoEndpointActive(
|
void toggleVideoEndpointActive(
|
||||||
|
@ -203,7 +170,6 @@ private:
|
||||||
base::Timer _raisedHandStatusRemoveTimer;
|
base::Timer _raisedHandStatusRemoveTimer;
|
||||||
|
|
||||||
base::flat_map<uint32, not_null<Row*>> _soundingRowBySsrc;
|
base::flat_map<uint32, not_null<Row*>> _soundingRowBySsrc;
|
||||||
//base::flat_map<std::string, not_null<Row*>> _videoEndpoints;
|
|
||||||
base::flat_set<not_null<PeerData*>> _cameraActive;
|
base::flat_set<not_null<PeerData*>> _cameraActive;
|
||||||
base::flat_set<not_null<PeerData*>> _screenActive;
|
base::flat_set<not_null<PeerData*>> _screenActive;
|
||||||
Ui::Animations::Basic _soundingAnimation;
|
Ui::Animations::Basic _soundingAnimation;
|
||||||
|
@ -216,7 +182,6 @@ private:
|
||||||
Ui::CrossLineAnimation _coloredCrossLine;
|
Ui::CrossLineAnimation _coloredCrossLine;
|
||||||
Ui::CrossLineAnimation _inactiveNarrowCrossLine;
|
Ui::CrossLineAnimation _inactiveNarrowCrossLine;
|
||||||
Ui::CrossLineAnimation _coloredNarrowCrossLine;
|
Ui::CrossLineAnimation _coloredNarrowCrossLine;
|
||||||
//Ui::CrossLineAnimation _videoNarrowCrossLine;
|
|
||||||
Ui::CrossLineAnimation _videoLargeCrossLine;
|
Ui::CrossLineAnimation _videoLargeCrossLine;
|
||||||
Ui::RoundRect _narrowRoundRectSelected;
|
Ui::RoundRect _narrowRoundRectSelected;
|
||||||
Ui::RoundRect _narrowRoundRect;
|
Ui::RoundRect _narrowRoundRect;
|
||||||
|
@ -239,7 +204,6 @@ Members::Controller::Controller(
|
||||||
, _coloredCrossLine(st::groupCallMemberColoredCrossLine)
|
, _coloredCrossLine(st::groupCallMemberColoredCrossLine)
|
||||||
, _inactiveNarrowCrossLine(st::groupCallNarrowInactiveCrossLine)
|
, _inactiveNarrowCrossLine(st::groupCallNarrowInactiveCrossLine)
|
||||||
, _coloredNarrowCrossLine(st::groupCallNarrowColoredCrossLine)
|
, _coloredNarrowCrossLine(st::groupCallNarrowColoredCrossLine)
|
||||||
//, _videoNarrowCrossLine(st::groupCallVideoCrossLine)
|
|
||||||
, _videoLargeCrossLine(st::groupCallLargeVideoCrossLine)
|
, _videoLargeCrossLine(st::groupCallLargeVideoCrossLine)
|
||||||
, _narrowRoundRectSelected(
|
, _narrowRoundRectSelected(
|
||||||
ImageRoundRadius::Large,
|
ImageRoundRadius::Large,
|
||||||
|
@ -251,7 +215,6 @@ Members::Controller::Controller(
|
||||||
_coloredCrossLine.invalidate();
|
_coloredCrossLine.invalidate();
|
||||||
_inactiveNarrowCrossLine.invalidate();
|
_inactiveNarrowCrossLine.invalidate();
|
||||||
_coloredNarrowCrossLine.invalidate();
|
_coloredNarrowCrossLine.invalidate();
|
||||||
//_videoNarrowCrossLine.invalidate();
|
|
||||||
}, _lifetime);
|
}, _lifetime);
|
||||||
|
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
|
@ -301,25 +264,6 @@ Members::Controller::~Controller() {
|
||||||
base::take(_menu);
|
base::take(_menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void Members::Controller::setRowVideoEndpoint(
|
|
||||||
// not_null<Row*> row,
|
|
||||||
// const std::string &endpoint) {
|
|
||||||
// const auto was = row->videoTrackEndpoint();
|
|
||||||
// if (was != endpoint) {
|
|
||||||
// if (!was.empty()) {
|
|
||||||
// _videoEndpoints.remove(was);
|
|
||||||
// }
|
|
||||||
// if (!endpoint.empty()) {
|
|
||||||
// _videoEndpoints.emplace(endpoint, row);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (endpoint.empty()) {
|
|
||||||
// row->clearVideoTrack();
|
|
||||||
// } else {
|
|
||||||
// _call->addVideoOutput(endpoint, row->createVideoTrack(endpoint));
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
void Members::Controller::setupListChangeViewers() {
|
void Members::Controller::setupListChangeViewers() {
|
||||||
_call->real(
|
_call->real(
|
||||||
) | rpl::start_with_next([=](not_null<Data::GroupCall*> real) {
|
) | rpl::start_with_next([=](not_null<Data::GroupCall*> real) {
|
||||||
|
@ -334,89 +278,6 @@ void Members::Controller::setupListChangeViewers() {
|
||||||
}
|
}
|
||||||
}, _lifetime);
|
}, _lifetime);
|
||||||
|
|
||||||
//_call->videoEndpointLargeValue(
|
|
||||||
//) | rpl::filter([=](const VideoEndpoint &largeEndpoint) {
|
|
||||||
// return (_largeEndpoint != largeEndpoint.endpoint);
|
|
||||||
//}) | rpl::start_with_next([=](const VideoEndpoint &largeEndpoint) {
|
|
||||||
// if (_call->streamsVideo(_largeEndpoint)) {
|
|
||||||
// if (const auto participant = findParticipant(_largeEndpoint)) {
|
|
||||||
// if (const auto row = findRow(participant->peer)) {
|
|
||||||
// const auto current = row->videoTrackEndpoint();
|
|
||||||
// if (current.empty()
|
|
||||||
// || (computeScreenEndpoint(participant) == _largeEndpoint
|
|
||||||
// && computeCameraEndpoint(participant) == current)) {
|
|
||||||
// setRowVideoEndpoint(row, _largeEndpoint);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// _largeEndpoint = largeEndpoint.endpoint;
|
|
||||||
// if (const auto participant = findParticipant(_largeEndpoint)) {
|
|
||||||
// if (const auto row = findRow(participant->peer)) {
|
|
||||||
// if (row->videoTrackEndpoint() == _largeEndpoint) {
|
|
||||||
// const auto &camera = computeCameraEndpoint(participant);
|
|
||||||
// const auto &screen = computeScreenEndpoint(participant);
|
|
||||||
// if (_largeEndpoint == camera
|
|
||||||
// && _call->streamsVideo(screen)) {
|
|
||||||
// setRowVideoEndpoint(row, screen);
|
|
||||||
// } else if (_largeEndpoint == screen
|
|
||||||
// && _call->streamsVideo(camera)) {
|
|
||||||
// setRowVideoEndpoint(row, camera);
|
|
||||||
// } else {
|
|
||||||
// setRowVideoEndpoint(row, std::string());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}, _lifetime);
|
|
||||||
|
|
||||||
//_call->streamsVideoUpdates(
|
|
||||||
//) | rpl::start_with_next([=](StreamsVideoUpdate update) {
|
|
||||||
// Assert(update.endpoint != _largeEndpoint);
|
|
||||||
// if (update.streams) {
|
|
||||||
// if (const auto participant = findParticipant(update.endpoint)) {
|
|
||||||
// if (const auto row = findRow(participant->peer)) {
|
|
||||||
// const auto &camera = computeCameraEndpoint(participant);
|
|
||||||
// const auto &screen = computeScreenEndpoint(participant);
|
|
||||||
// if (update.endpoint == camera
|
|
||||||
// && (!_call->streamsVideo(screen)
|
|
||||||
// || _largeEndpoint == screen)) {
|
|
||||||
// setRowVideoEndpoint(row, camera);
|
|
||||||
// } else if (update.endpoint == screen
|
|
||||||
// && (_largeEndpoint != screen)) {
|
|
||||||
// setRowVideoEndpoint(row, screen);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// const auto i = _videoEndpoints.find(update.endpoint);
|
|
||||||
// if (i != end(_videoEndpoints)) {
|
|
||||||
// const auto row = i->second;
|
|
||||||
// const auto real = _call->lookupReal();
|
|
||||||
// Assert(real != nullptr);
|
|
||||||
// const auto participant = real->participantByPeer(
|
|
||||||
// row->peer());
|
|
||||||
// if (!participant) {
|
|
||||||
// setRowVideoEndpoint(row, std::string());
|
|
||||||
// } else {
|
|
||||||
// const auto &camera = computeCameraEndpoint(participant);
|
|
||||||
// const auto &screen = computeScreenEndpoint(participant);
|
|
||||||
// if (update.endpoint == camera
|
|
||||||
// && (_largeEndpoint != screen)
|
|
||||||
// && _call->streamsVideo(screen)) {
|
|
||||||
// setRowVideoEndpoint(row, screen);
|
|
||||||
// } else if (update.endpoint == screen
|
|
||||||
// && (_largeEndpoint != camera)
|
|
||||||
// && _call->streamsVideo(camera)) {
|
|
||||||
// setRowVideoEndpoint(row, camera);
|
|
||||||
// } else {
|
|
||||||
// setRowVideoEndpoint(row, std::string());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}, _lifetime);
|
|
||||||
|
|
||||||
_call->videoEndpointPinnedValue(
|
_call->videoEndpointPinnedValue(
|
||||||
) | rpl::start_with_next([=](const VideoEndpoint &pinned) {
|
) | rpl::start_with_next([=](const VideoEndpoint &pinned) {
|
||||||
if (pinned) {
|
if (pinned) {
|
||||||
|
@ -1036,8 +897,6 @@ void Members::Controller::rowPaintIcon(
|
||||||
if (_mode == PanelMode::Wide && state.style == MembersRowStyle::None) {
|
if (_mode == PanelMode::Wide && state.style == MembersRowStyle::None) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//const auto narrowUserpic = (state.style == MembersRowStyle::Userpic);
|
|
||||||
//const auto narrowVideo = (state.style == MembersRowStyle::Video);
|
|
||||||
const auto narrow = (state.style == MembersRowStyle::Narrow);
|
const auto narrow = (state.style == MembersRowStyle::Narrow);
|
||||||
if (!narrow && state.invited) {
|
if (!narrow && state.invited) {
|
||||||
st::groupCallMemberInvited.paintInCenter(
|
st::groupCallMemberInvited.paintInCenter(
|
||||||
|
@ -1050,10 +909,6 @@ void Members::Controller::rowPaintIcon(
|
||||||
const auto largeVideo = (state.style == MembersRowStyle::LargeVideo);
|
const auto largeVideo = (state.style == MembersRowStyle::LargeVideo);
|
||||||
const auto &greenIcon = largeVideo
|
const auto &greenIcon = largeVideo
|
||||||
? st::groupCallLargeVideoCrossLine.icon
|
? st::groupCallLargeVideoCrossLine.icon
|
||||||
//: narrowVideo
|
|
||||||
//? st::groupCallVideoCrossLine.icon
|
|
||||||
//: narrowUserpic
|
|
||||||
//? st::groupCallNarrowColoredCrossLine.icon
|
|
||||||
: narrow
|
: narrow
|
||||||
? st::groupCallNarrowColoredCrossLine.icon
|
? st::groupCallNarrowColoredCrossLine.icon
|
||||||
: st::groupCallMemberColoredCrossLine.icon;
|
: st::groupCallMemberColoredCrossLine.icon;
|
||||||
|
@ -1068,10 +923,6 @@ void Members::Controller::rowPaintIcon(
|
||||||
// Just gray icon, no cross, no coloring.
|
// Just gray icon, no cross, no coloring.
|
||||||
const auto &grayIcon = largeVideo
|
const auto &grayIcon = largeVideo
|
||||||
? st::groupCallLargeVideoCrossLine.icon
|
? st::groupCallLargeVideoCrossLine.icon
|
||||||
//: narrowVideo
|
|
||||||
//? st::groupCallVideoCrossLine.icon
|
|
||||||
//: narrowUserpic
|
|
||||||
//? st::groupCallNarrowInactiveCrossLine.icon
|
|
||||||
: narrow
|
: narrow
|
||||||
? st::groupCallNarrowInactiveCrossLine.icon
|
? st::groupCallNarrowInactiveCrossLine.icon
|
||||||
: st::groupCallMemberInactiveCrossLine.icon;
|
: st::groupCallMemberInactiveCrossLine.icon;
|
||||||
|
@ -1088,14 +939,10 @@ void Members::Controller::rowPaintIcon(
|
||||||
// Red crossed icon, colorized once, cached as last frame.
|
// Red crossed icon, colorized once, cached as last frame.
|
||||||
auto &line = largeVideo
|
auto &line = largeVideo
|
||||||
? _videoLargeCrossLine
|
? _videoLargeCrossLine
|
||||||
//: narrowVideo
|
|
||||||
//? _videoNarrowCrossLine
|
|
||||||
//: narrowUserpic
|
|
||||||
//? _coloredNarrowCrossLine
|
|
||||||
: narrow
|
: narrow
|
||||||
? _coloredNarrowCrossLine
|
? _coloredNarrowCrossLine
|
||||||
: _coloredCrossLine;
|
: _coloredCrossLine;
|
||||||
const auto color = (largeVideo/* || narrowVideo*/)
|
const auto color = largeVideo
|
||||||
? std::nullopt
|
? std::nullopt
|
||||||
: std::make_optional(narrow
|
: std::make_optional(narrow
|
||||||
? st::groupCallMemberNotJoinedStatus->c
|
? st::groupCallMemberNotJoinedStatus->c
|
||||||
|
@ -1111,10 +958,6 @@ void Members::Controller::rowPaintIcon(
|
||||||
// Gray crossed icon, no coloring, cached as last frame.
|
// Gray crossed icon, no coloring, cached as last frame.
|
||||||
auto &line = largeVideo
|
auto &line = largeVideo
|
||||||
? _videoLargeCrossLine
|
? _videoLargeCrossLine
|
||||||
//: narrowVideo
|
|
||||||
//? _videoNarrowCrossLine
|
|
||||||
//: narrowUserpic
|
|
||||||
//? _inactiveNarrowCrossLine
|
|
||||||
: narrow
|
: narrow
|
||||||
? _inactiveNarrowCrossLine
|
? _inactiveNarrowCrossLine
|
||||||
: _inactiveCrossLine;
|
: _inactiveCrossLine;
|
||||||
|
@ -1139,7 +982,7 @@ void Members::Controller::rowPaintIcon(
|
||||||
? st::groupCallMemberNotJoinedStatus
|
? st::groupCallMemberNotJoinedStatus
|
||||||
: st::groupCallMemberMutedIcon),
|
: st::groupCallMemberMutedIcon),
|
||||||
state.muted);
|
state.muted);
|
||||||
const auto color = (largeVideo/* || narrowVideo*/)
|
const auto color = largeVideo
|
||||||
? std::nullopt
|
? std::nullopt
|
||||||
: std::make_optional((narrow && state.mutedByMe)
|
: std::make_optional((narrow && state.mutedByMe)
|
||||||
? st::groupCallMemberMutedIcon->c
|
? st::groupCallMemberMutedIcon->c
|
||||||
|
@ -1152,10 +995,6 @@ void Members::Controller::rowPaintIcon(
|
||||||
const auto crossProgress = std::min(1. - state.active, 0.9999);
|
const auto crossProgress = std::min(1. - state.active, 0.9999);
|
||||||
auto &line = largeVideo
|
auto &line = largeVideo
|
||||||
? _videoLargeCrossLine
|
? _videoLargeCrossLine
|
||||||
//: narrowVideo
|
|
||||||
//? _videoNarrowCrossLine
|
|
||||||
//: narrowUserpic
|
|
||||||
//? _inactiveNarrowCrossLine
|
|
||||||
: narrow
|
: narrow
|
||||||
? _inactiveNarrowCrossLine
|
? _inactiveNarrowCrossLine
|
||||||
: _inactiveCrossLine;
|
: _inactiveCrossLine;
|
||||||
|
@ -1235,103 +1074,13 @@ void Members::Controller::rowShowContextMenu(not_null<PeerListRow*> row) {
|
||||||
showRowMenu(row, false);
|
showRowMenu(row, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void Members::Controller::rowPaintNarrowBackground(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// bool selected) {
|
|
||||||
// (selected ? _narrowRoundRectSelected : _narrowRoundRect).paint(
|
|
||||||
// p,
|
|
||||||
// { QPoint(x, y), st::groupCallNarrowSize });
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void Members::Controller::rowPaintNarrowBorder(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// not_null<Row*> row) {
|
|
||||||
// if (_call->videoEndpointLarge().peer != row->peer().get()) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// auto hq = PainterHighQualityEnabler(p);
|
|
||||||
// p.setBrush(Qt::NoBrush);
|
|
||||||
// auto pen = st::groupCallMemberActiveIcon->p;
|
|
||||||
// pen.setWidthF(st::groupCallNarrowOutline);
|
|
||||||
// p.setPen(pen);
|
|
||||||
// p.drawRoundedRect(
|
|
||||||
// QRect{ QPoint(x, y), st::groupCallNarrowSize },
|
|
||||||
// st::roundRadiusLarge,
|
|
||||||
// st::roundRadiusLarge);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void Members::Controller::rowPaintNarrowShadow(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh) {
|
|
||||||
// if (_narrowShadow.isNull()) {
|
|
||||||
// _narrowShadow = GenerateShadow(
|
|
||||||
// st::groupCallNarrowShadowHeight,
|
|
||||||
// 0,
|
|
||||||
// kShadowMaxAlpha);
|
|
||||||
// }
|
|
||||||
// const auto height = st::groupCallNarrowShadowHeight;
|
|
||||||
// p.drawImage(
|
|
||||||
// QRect(x, y + sizeh - height, sizew, height),
|
|
||||||
// _narrowShadow);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//int Members::Controller::customRowHeight() {
|
|
||||||
// return st::groupCallNarrowSize.height() + st::groupCallNarrowRowSkip * 2;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void Members::Controller::customRowPaint(
|
|
||||||
// Painter &p,
|
|
||||||
// crl::time now,
|
|
||||||
// not_null<PeerListRow*> row,
|
|
||||||
// bool selected) {
|
|
||||||
// const auto real = static_cast<Row*>(row.get());
|
|
||||||
// const auto width = st::groupCallNarrowSize.width();
|
|
||||||
// const auto height = st::groupCallNarrowSize.height();
|
|
||||||
// real->paintComplexUserpic(
|
|
||||||
// p,
|
|
||||||
// st::groupCallNarrowSkip,
|
|
||||||
// st::groupCallNarrowRowSkip,
|
|
||||||
// width,
|
|
||||||
// width,
|
|
||||||
// height,
|
|
||||||
// PanelMode::Wide,
|
|
||||||
// selected);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//bool Members::Controller::customRowSelectionPoint(
|
|
||||||
// not_null<PeerListRow*> row,
|
|
||||||
// int x,
|
|
||||||
// int y) {
|
|
||||||
// return x >= st::groupCallNarrowSkip
|
|
||||||
// && x < st::groupCallNarrowSkip + st::groupCallNarrowSize.width()
|
|
||||||
// && y >= st::groupCallNarrowRowSkip
|
|
||||||
// && y < st::groupCallNarrowRowSkip + st::groupCallNarrowSize.height();
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//Fn<QImage()> Members::Controller::customRowRippleMaskGenerator() {
|
|
||||||
// return [] {
|
|
||||||
// return Ui::RippleAnimation::roundRectMask(
|
|
||||||
// st::groupCallNarrowSize,
|
|
||||||
// st::roundRadiusLarge);
|
|
||||||
// };
|
|
||||||
//}
|
|
||||||
|
|
||||||
auto Members::Controller::kickParticipantRequests() const
|
auto Members::Controller::kickParticipantRequests() const
|
||||||
-> rpl::producer<not_null<PeerData*>>{
|
-> rpl::producer<not_null<PeerData*>>{
|
||||||
return _kickParticipantRequests.events();
|
return _kickParticipantRequests.events();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Members::Controller::rowClicked(not_null<PeerListRow*> row) {
|
void Members::Controller::rowClicked(not_null<PeerListRow*> row) {
|
||||||
if (!toggleRowVideo(row)) {
|
showRowMenu(row, true);
|
||||||
showRowMenu(row, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Members::Controller::showRowMenu(
|
void Members::Controller::showRowMenu(
|
||||||
|
@ -1352,49 +1101,6 @@ void Members::Controller::showRowMenu(
|
||||||
delegate()->peerListShowRowMenu(row, highlightRow, cleanup);
|
delegate()->peerListShowRowMenu(row, highlightRow, cleanup);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Members::Controller::toggleRowVideo(not_null<PeerListRow*> row) {
|
|
||||||
return false;
|
|
||||||
//const auto real = _call->lookupReal();
|
|
||||||
//if (!real) {
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
//const auto participantPeer = row->peer();
|
|
||||||
//const auto isMe = (participantPeer == _call->joinAs());
|
|
||||||
//const auto participant = real->participantByPeer(participantPeer);
|
|
||||||
//if (!participant) {
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
//const auto params = participant->videoParams.get();
|
|
||||||
//const auto empty = std::string();
|
|
||||||
//const auto &camera = isMe
|
|
||||||
// ? _call->cameraSharingEndpoint()
|
|
||||||
// : (params && _call->streamsVideo(params->camera.endpoint))
|
|
||||||
// ? params->camera.endpoint
|
|
||||||
// : empty;
|
|
||||||
//const auto &screen = isMe
|
|
||||||
// ? _call->screenSharingEndpoint()
|
|
||||||
// : (params && _call->streamsVideo(params->screen.endpoint))
|
|
||||||
// ? params->screen.endpoint
|
|
||||||
// : empty;
|
|
||||||
//const auto &large = _call->videoEndpointLarge().endpoint;
|
|
||||||
//const auto show = [&] {
|
|
||||||
// if (!screen.empty() && large != screen) {
|
|
||||||
// return screen;
|
|
||||||
// } else if (!camera.empty() && large != camera) {
|
|
||||||
// return camera;
|
|
||||||
// }
|
|
||||||
// return std::string();
|
|
||||||
//}();
|
|
||||||
//if (show.empty()) {
|
|
||||||
// return false;
|
|
||||||
//} else if (_call->videoEndpointPinned()) {
|
|
||||||
// _call->pinVideoEndpoint({ participantPeer, show });
|
|
||||||
//} else {
|
|
||||||
// _call->showVideoEndpointLarge({ participantPeer, show });
|
|
||||||
//}
|
|
||||||
//return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Members::Controller::rowActionClicked(
|
void Members::Controller::rowActionClicked(
|
||||||
not_null<PeerListRow*> row) {
|
not_null<PeerListRow*> row) {
|
||||||
showRowMenu(row, true);
|
showRowMenu(row, true);
|
||||||
|
@ -1779,9 +1485,7 @@ int Members::desiredHeight() const {
|
||||||
return 0;
|
return 0;
|
||||||
}();
|
}();
|
||||||
const auto use = std::max(count, _list->fullRowsCount());
|
const auto use = std::max(count, _list->fullRowsCount());
|
||||||
const auto single = /*(_mode.current() == PanelMode::Wide)
|
const auto single = st::groupCallMembersList.item.height;
|
||||||
? (st::groupCallNarrowSize.height() + st::groupCallNarrowRowSkip * 2)
|
|
||||||
: */st::groupCallMembersList.item.height;
|
|
||||||
const auto desired = (_layout->height() - _list->height())
|
const auto desired = (_layout->height() - _list->height())
|
||||||
+ (use * single)
|
+ (use * single)
|
||||||
+ (use ? st::lineWidth : 0);
|
+ (use ? st::lineWidth : 0);
|
||||||
|
@ -1834,51 +1538,22 @@ void Members::setupAddMember(not_null<GroupCall*> call) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto addMember = (Ui::AbstractButton*)nullptr;
|
auto addMember = Settings::CreateButton(
|
||||||
auto wrap = [&]() -> object_ptr<Ui::RpWidget> {
|
_layout.get(),
|
||||||
//if (mode == PanelMode::Default) {
|
tr::lng_group_call_invite(),
|
||||||
auto result = Settings::CreateButton(
|
st::groupCallAddMember,
|
||||||
_layout.get(),
|
&st::groupCallAddMemberIcon,
|
||||||
tr::lng_group_call_invite(),
|
st::groupCallAddMemberIconLeft,
|
||||||
st::groupCallAddMember,
|
&st::groupCallMemberInactiveIcon);
|
||||||
&st::groupCallAddMemberIcon,
|
|
||||||
st::groupCallAddMemberIconLeft,
|
|
||||||
&st::groupCallMemberInactiveIcon);
|
|
||||||
addMember = result.data();
|
|
||||||
return result;
|
|
||||||
//}
|
|
||||||
//auto result = object_ptr<Ui::RpWidget>(_layout.get());
|
|
||||||
//const auto skip = st::groupCallNarrowSkip;
|
|
||||||
//const auto fullwidth = st::groupCallNarrowSize.width()
|
|
||||||
// + 2 * skip;
|
|
||||||
//const auto fullheight = st::groupCallNarrowAddMember.height
|
|
||||||
// + st::groupCallNarrowRowSkip;
|
|
||||||
//result->resize(fullwidth, fullheight);
|
|
||||||
//const auto button = Ui::CreateChild<Ui::RoundButton>(
|
|
||||||
// result.data(),
|
|
||||||
// rpl::single(QString()),
|
|
||||||
// st::groupCallNarrowAddMember);
|
|
||||||
//button->move(skip, 0);
|
|
||||||
//const auto width = fullwidth - 2 * skip;
|
|
||||||
//button->setFullWidth(width);
|
|
||||||
//Settings::AddButtonIcon(
|
|
||||||
// button,
|
|
||||||
// &st::groupCallAddMemberIcon,
|
|
||||||
// (width - st::groupCallAddMemberIcon.width()) / 2,
|
|
||||||
// &st::groupCallMemberInactiveIcon);
|
|
||||||
//addMember = button;
|
|
||||||
//return result;
|
|
||||||
}();
|
|
||||||
addMember->show();
|
|
||||||
addMember->clicks(
|
addMember->clicks(
|
||||||
) | rpl::to_empty | rpl::start_to_stream(
|
) | rpl::to_empty | rpl::start_to_stream(
|
||||||
_addMemberRequests,
|
_addMemberRequests,
|
||||||
addMember->lifetime());
|
addMember->lifetime());
|
||||||
wrap->show();
|
addMember->show();
|
||||||
wrap->resizeToWidth(_layout->width());
|
addMember->resizeToWidth(_layout->width());
|
||||||
delete _addMemberButton.current();
|
delete _addMemberButton.current();
|
||||||
_addMemberButton = wrap.data();
|
_addMemberButton = addMember.data();
|
||||||
_layout->insert(3, std::move(wrap));
|
_layout->insert(3, std::move(addMember));
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
|
@ -1898,9 +1573,6 @@ void Members::setMode(PanelMode mode) {
|
||||||
}
|
}
|
||||||
_mode = mode;
|
_mode = mode;
|
||||||
_listController->setMode(mode);
|
_listController->setMode(mode);
|
||||||
//_list->setMode((mode == PanelMode::Wide)
|
|
||||||
// ? PeerListContent::Mode::Custom
|
|
||||||
// : PeerListContent::Mode::Default);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect Members::getInnerGeometry() const {
|
QRect Members::getInnerGeometry() const {
|
||||||
|
|
|
@ -370,58 +370,6 @@ void MembersRow::ensureUserpicCache(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MembersRow::paintVideo(
|
|
||||||
Painter &p,
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
int sizew,
|
|
||||||
int sizeh,
|
|
||||||
PanelMode mode) {
|
|
||||||
return false;
|
|
||||||
//if (!_videoTrackShown) {
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
//const auto guard = gsl::finally([&] {
|
|
||||||
// _videoTrackShown->markFrameShown();
|
|
||||||
//});
|
|
||||||
//const auto videoSize = _videoTrackShown->frameSize();
|
|
||||||
//if (videoSize.isEmpty()
|
|
||||||
// || _videoTrackShown->state() != Webrtc::VideoState::Active) {
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
//const auto videow = videoSize.width();
|
|
||||||
//const auto videoh = videoSize.height();
|
|
||||||
//const auto resize = (videow * sizeh > videoh * sizew)
|
|
||||||
// ? QSize(videow * sizeh / videoh, sizeh)
|
|
||||||
// : QSize(sizew, videoh * sizew / videow);
|
|
||||||
//const auto request = Webrtc::FrameRequest{
|
|
||||||
// .resize = resize * cIntRetinaFactor(),
|
|
||||||
// .outer = QSize(sizew, sizeh) * cIntRetinaFactor(),
|
|
||||||
//};
|
|
||||||
//const auto frame = _videoTrackShown->frame(request);
|
|
||||||
//auto copy = frame; // TODO calls optimize.
|
|
||||||
//copy.detach();
|
|
||||||
//if (mode == PanelMode::Default) {
|
|
||||||
// Images::prepareCircle(copy);
|
|
||||||
//} else {
|
|
||||||
// Images::prepareRound(copy, ImageRoundRadius::Large);
|
|
||||||
//}
|
|
||||||
//p.drawImage(
|
|
||||||
// QRect(QPoint(x, y), copy.size() / cIntRetinaFactor()),
|
|
||||||
// copy);
|
|
||||||
//return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//std::tuple<int, int, int> MembersRow::UserpicInNarrowMode(
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh) {
|
|
||||||
// const auto useSize = st::groupCallMembersList.item.photoSize;
|
|
||||||
// const auto skipx = (sizew - useSize) / 2;
|
|
||||||
// return { x + skipx, y + st::groupCallNarrowUserpicTop, useSize };
|
|
||||||
//}
|
|
||||||
|
|
||||||
void MembersRow::paintBlobs(
|
void MembersRow::paintBlobs(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
int x,
|
int x,
|
||||||
|
@ -433,9 +381,6 @@ void MembersRow::paintBlobs(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto size = sizew;
|
auto size = sizew;
|
||||||
//if (mode == PanelMode::Wide) {
|
|
||||||
// std::tie(x, y, size) = UserpicInNarrowMode(x, y, sizew, sizeh);
|
|
||||||
//}
|
|
||||||
const auto mutedByMe = (_state == State::MutedByMe);
|
const auto mutedByMe = (_state == State::MutedByMe);
|
||||||
const auto shift = QPointF(x + size / 2., y + size / 2.);
|
const auto shift = QPointF(x + size / 2., y + size / 2.);
|
||||||
auto hq = PainterHighQualityEnabler(p);
|
auto hq = PainterHighQualityEnabler(p);
|
||||||
|
@ -461,9 +406,6 @@ void MembersRow::paintScaledUserpic(
|
||||||
int sizeh,
|
int sizeh,
|
||||||
PanelMode mode) {
|
PanelMode mode) {
|
||||||
auto size = sizew;
|
auto size = sizew;
|
||||||
//if (mode == PanelMode::Wide) {
|
|
||||||
// std::tie(x, y, size) = UserpicInNarrowMode(x, y, sizew, sizeh);
|
|
||||||
//}
|
|
||||||
if (!_blobsAnimation) {
|
if (!_blobsAnimation) {
|
||||||
peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size);
|
peer()->paintUserpicLeft(p, userpic, x, y, outerWidth, size);
|
||||||
return;
|
return;
|
||||||
|
@ -503,73 +445,6 @@ void MembersRow::paintMuteIcon(
|
||||||
_delegate->rowPaintIcon(p, iconRect, computeIconState(style));
|
_delegate->rowPaintIcon(p, iconRect, computeIconState(style));
|
||||||
}
|
}
|
||||||
|
|
||||||
//void MembersRow::paintNarrowName(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh,
|
|
||||||
// MembersRowStyle style) {
|
|
||||||
// if (_narrowName.isEmpty()) {
|
|
||||||
// _narrowName.setText(
|
|
||||||
// st::semiboldTextStyle,
|
|
||||||
// generateShortName(),
|
|
||||||
// Ui::NameTextOptions());
|
|
||||||
// }
|
|
||||||
// if (style == MembersRowStyle::Video) {
|
|
||||||
// _delegate->rowPaintNarrowShadow(p, x, y, sizew, sizeh);
|
|
||||||
// }
|
|
||||||
// const auto &icon = st::groupCallVideoCrossLine.icon;
|
|
||||||
// const auto added = icon.width() - st::groupCallNarrowIconLess;
|
|
||||||
// const auto available = sizew - 2 * st::normalFont->spacew - added;
|
|
||||||
// const auto use = std::min(available, _narrowName.maxWidth());
|
|
||||||
// const auto left = x + (sizew - use - added) / 2;
|
|
||||||
// const auto iconRect = QRect(
|
|
||||||
// left - st::groupCallNarrowIconLess,
|
|
||||||
// y + st::groupCallNarrowIconTop,
|
|
||||||
// icon.width(),
|
|
||||||
// icon.height());
|
|
||||||
// const auto &state = computeIconState(style);
|
|
||||||
// _delegate->rowPaintIcon(p, iconRect, state);
|
|
||||||
//
|
|
||||||
// p.setPen([&] {
|
|
||||||
// if (style == MembersRowStyle::Video) {
|
|
||||||
// return st::groupCallVideoTextFg->p;
|
|
||||||
// } else if (state.speaking == 1. && !state.mutedByMe) {
|
|
||||||
// return st::groupCallMemberActiveIcon->p;
|
|
||||||
// } else if (state.speaking == 0.) {
|
|
||||||
// if (state.active == 1.) {
|
|
||||||
// return st::groupCallMemberInactiveIcon->p;
|
|
||||||
// } else if (state.active == 0.) {
|
|
||||||
// if (state.muted == 1.) {
|
|
||||||
// return state.raisedHand
|
|
||||||
// ? st::groupCallMemberInactiveStatus->p
|
|
||||||
// : st::groupCallMemberMutedIcon->p;
|
|
||||||
// } else if (state.muted == 0.) {
|
|
||||||
// return st::groupCallMemberInactiveIcon->p;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// const auto activeInactiveColor = anim::color(
|
|
||||||
// st::groupCallMemberInactiveIcon,
|
|
||||||
// (state.mutedByMe
|
|
||||||
// ? st::groupCallMemberMutedIcon
|
|
||||||
// : st::groupCallMemberActiveIcon),
|
|
||||||
// state.speaking);
|
|
||||||
// return anim::pen(
|
|
||||||
// activeInactiveColor,
|
|
||||||
// st::groupCallMemberMutedIcon,
|
|
||||||
// state.muted);
|
|
||||||
// }());
|
|
||||||
// const auto nameLeft = iconRect.x() + icon.width();
|
|
||||||
// const auto nameTop = y + st::groupCallNarrowNameTop;
|
|
||||||
// if (use == available) {
|
|
||||||
// _narrowName.drawLeftElided(p, nameLeft, nameTop, available, sizew);
|
|
||||||
// } else {
|
|
||||||
// _narrowName.drawLeft(p, nameLeft, nameTop, available, sizew);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
auto MembersRow::generatePaintUserpicCallback() -> PaintRoundImageCallback {
|
auto MembersRow::generatePaintUserpicCallback() -> PaintRoundImageCallback {
|
||||||
return [=](Painter &p, int x, int y, int outerWidth, int size) {
|
return [=](Painter &p, int x, int y, int outerWidth, int size) {
|
||||||
const auto outer = outerWidth;
|
const auto outer = outerWidth;
|
||||||
|
@ -586,20 +461,7 @@ void MembersRow::paintComplexUserpic(
|
||||||
int sizeh,
|
int sizeh,
|
||||||
PanelMode mode,
|
PanelMode mode,
|
||||||
bool selected) {
|
bool selected) {
|
||||||
//if (mode == PanelMode::Wide) {
|
|
||||||
// if (paintVideo(p, x, y, sizew, sizeh, mode)) {
|
|
||||||
// paintNarrowName(p, x, y, sizew, sizeh, MembersRowStyle::Video);
|
|
||||||
// _delegate->rowPaintNarrowBorder(p, x, y, this);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// _delegate->rowPaintNarrowBackground(p, x, y, selected);
|
|
||||||
// paintRipple(p, x, y, outerWidth);
|
|
||||||
//}
|
|
||||||
paintBlobs(p, x, y, sizew, sizeh, mode);
|
paintBlobs(p, x, y, sizew, sizeh, mode);
|
||||||
//if (mode == PanelMode::Default
|
|
||||||
// && paintVideo(p, x, y, sizew, sizeh, mode)) {
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
paintScaledUserpic(
|
paintScaledUserpic(
|
||||||
p,
|
p,
|
||||||
ensureUserpicView(),
|
ensureUserpicView(),
|
||||||
|
@ -609,10 +471,6 @@ void MembersRow::paintComplexUserpic(
|
||||||
sizew,
|
sizew,
|
||||||
sizeh,
|
sizeh,
|
||||||
mode);
|
mode);
|
||||||
//if (mode == PanelMode::Wide) {
|
|
||||||
// paintNarrowName(p, x, y, sizew, sizeh, MembersRowStyle::Userpic);
|
|
||||||
// _delegate->rowPaintNarrowBorder(p, x, y, this);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int MembersRow::statusIconWidth(bool skipIcon) const {
|
int MembersRow::statusIconWidth(bool skipIcon) const {
|
||||||
|
@ -883,41 +741,6 @@ void MembersRow::refreshStatus() {
|
||||||
_speaking);
|
_speaking);
|
||||||
}
|
}
|
||||||
|
|
||||||
//not_null<Webrtc::VideoTrack*> MembersRow::createVideoTrack(
|
|
||||||
// const std::string &endpoint) {
|
|
||||||
// _videoTrackShown = nullptr;
|
|
||||||
// _videoTrackEndpoint = endpoint;
|
|
||||||
// _videoTrack = std::make_unique<Webrtc::VideoTrack>(
|
|
||||||
// Webrtc::VideoState::Active);
|
|
||||||
// setVideoTrack(_videoTrack.get());
|
|
||||||
// return _videoTrack.get();
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//const std::string &MembersRow::videoTrackEndpoint() const {
|
|
||||||
// return _videoTrackEndpoint;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void MembersRow::clearVideoTrack() {
|
|
||||||
// _videoTrackLifetime.destroy();
|
|
||||||
// _videoTrackEndpoint = std::string();
|
|
||||||
// _videoTrackShown = nullptr;
|
|
||||||
// _videoTrack = nullptr;
|
|
||||||
// _delegate->rowUpdateRow(this);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void MembersRow::setVideoTrack(not_null<Webrtc::VideoTrack*> track) {
|
|
||||||
// _videoTrackLifetime.destroy();
|
|
||||||
// _videoTrackShown = track;
|
|
||||||
// _videoTrackShown->renderNextFrame(
|
|
||||||
// ) | rpl::start_with_next([=] {
|
|
||||||
// _delegate->rowUpdateRow(this);
|
|
||||||
// if (_videoTrackShown->frameSize().isEmpty()) {
|
|
||||||
// _videoTrackShown->markFrameShown();
|
|
||||||
// }
|
|
||||||
// }, _videoTrackLifetime);
|
|
||||||
// _delegate->rowUpdateRow(this);
|
|
||||||
//}
|
|
||||||
|
|
||||||
void MembersRow::addActionRipple(QPoint point, Fn<void()> updateCallback) {
|
void MembersRow::addActionRipple(QPoint point, Fn<void()> updateCallback) {
|
||||||
if (!_actionRipple) {
|
if (!_actionRipple) {
|
||||||
auto mask = Ui::RippleAnimation::ellipseMask(QSize(
|
auto mask = Ui::RippleAnimation::ellipseMask(QSize(
|
||||||
|
|
|
@ -13,10 +13,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
class PeerData;
|
class PeerData;
|
||||||
class Painter;
|
class Painter;
|
||||||
|
|
||||||
//namespace Webrtc {
|
|
||||||
//class VideoTrack;
|
|
||||||
//} // namespace Webrtc
|
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
struct GroupCallParticipant;
|
struct GroupCallParticipant;
|
||||||
} // namespace Data
|
} // namespace Data
|
||||||
|
@ -29,8 +25,6 @@ namespace Calls::Group {
|
||||||
|
|
||||||
enum class MembersRowStyle {
|
enum class MembersRowStyle {
|
||||||
None,
|
None,
|
||||||
//Userpic,
|
|
||||||
//Video,
|
|
||||||
Narrow,
|
Narrow,
|
||||||
LargeVideo,
|
LargeVideo,
|
||||||
};
|
};
|
||||||
|
@ -65,22 +59,6 @@ public:
|
||||||
const IconState &state) = 0;
|
const IconState &state) = 0;
|
||||||
virtual bool rowIsNarrow() = 0;
|
virtual bool rowIsNarrow() = 0;
|
||||||
virtual void rowShowContextMenu(not_null<PeerListRow*> row) = 0;
|
virtual void rowShowContextMenu(not_null<PeerListRow*> row) = 0;
|
||||||
//virtual void rowPaintNarrowBackground(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// bool selected) = 0;
|
|
||||||
//virtual void rowPaintNarrowBorder(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// not_null<MembersRow*> row) = 0;
|
|
||||||
//virtual void rowPaintNarrowShadow(
|
|
||||||
// Painter &p,
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MembersRow final : public PeerListRow {
|
class MembersRow final : public PeerListRow {
|
||||||
|
@ -127,12 +105,6 @@ public:
|
||||||
return _raisedHandRating;
|
return _raisedHandRating;
|
||||||
}
|
}
|
||||||
|
|
||||||
//[[nodiscard]] not_null<Webrtc::VideoTrack*> createVideoTrack(
|
|
||||||
// const std::string &endpoint);
|
|
||||||
//void clearVideoTrack();
|
|
||||||
//[[nodiscard]] const std::string &videoTrackEndpoint() const;
|
|
||||||
//void setVideoTrack(not_null<Webrtc::VideoTrack*> track);
|
|
||||||
|
|
||||||
void addActionRipple(QPoint point, Fn<void()> updateCallback) override;
|
void addActionRipple(QPoint point, Fn<void()> updateCallback) override;
|
||||||
void stopLastActionRipple() override;
|
void stopLastActionRipple() override;
|
||||||
|
|
||||||
|
@ -211,18 +183,6 @@ private:
|
||||||
void ensureUserpicCache(
|
void ensureUserpicCache(
|
||||||
std::shared_ptr<Data::CloudImageView> &view,
|
std::shared_ptr<Data::CloudImageView> &view,
|
||||||
int size);
|
int size);
|
||||||
bool paintVideo(
|
|
||||||
Painter &p,
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
int sizew,
|
|
||||||
int sizeh,
|
|
||||||
PanelMode mode);
|
|
||||||
//[[nodiscard]] static std::tuple<int, int, int> UserpicInNarrowMode(
|
|
||||||
// int x,
|
|
||||||
// int y,
|
|
||||||
// int sizew,
|
|
||||||
// int sizeh);
|
|
||||||
void paintBlobs(
|
void paintBlobs(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
int x,
|
int x,
|
||||||
|
@ -238,27 +198,15 @@ private:
|
||||||
int sizew,
|
int sizew,
|
||||||
int sizeh,
|
int sizeh,
|
||||||
PanelMode mode);
|
PanelMode mode);
|
||||||
void paintNarrowName(
|
|
||||||
Painter &p,
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
int sizew,
|
|
||||||
int sizeh,
|
|
||||||
MembersRowStyle style);
|
|
||||||
|
|
||||||
const not_null<MembersRowDelegate*> _delegate;
|
const not_null<MembersRowDelegate*> _delegate;
|
||||||
State _state = State::Inactive;
|
State _state = State::Inactive;
|
||||||
std::unique_ptr<Ui::RippleAnimation> _actionRipple;
|
std::unique_ptr<Ui::RippleAnimation> _actionRipple;
|
||||||
std::unique_ptr<BlobsAnimation> _blobsAnimation;
|
std::unique_ptr<BlobsAnimation> _blobsAnimation;
|
||||||
std::unique_ptr<StatusIcon> _statusIcon;
|
std::unique_ptr<StatusIcon> _statusIcon;
|
||||||
//std::unique_ptr<Webrtc::VideoTrack> _videoTrack;
|
|
||||||
//Webrtc::VideoTrack *_videoTrackShown = nullptr;
|
|
||||||
//std::string _videoTrackEndpoint;
|
|
||||||
//rpl::lifetime _videoTrackLifetime; // TODO calls move to unique_ptr.
|
|
||||||
Ui::Animations::Simple _speakingAnimation; // For gray-red/green icon.
|
Ui::Animations::Simple _speakingAnimation; // For gray-red/green icon.
|
||||||
Ui::Animations::Simple _mutedAnimation; // For gray/red icon.
|
Ui::Animations::Simple _mutedAnimation; // For gray/red icon.
|
||||||
Ui::Animations::Simple _activeAnimation; // For icon cross animation.
|
Ui::Animations::Simple _activeAnimation; // For icon cross animation.
|
||||||
Ui::Text::String _narrowName;
|
|
||||||
QString _aboutText;
|
QString _aboutText;
|
||||||
crl::time _speakingLastTime = 0;
|
crl::time _speakingLastTime = 0;
|
||||||
uint64 _raisedHandRating = 0;
|
uint64 _raisedHandRating = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue