mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-08 08:04:08 +02:00
Auto-pin new screencasts.
This commit is contained in:
parent
d19d6bbcd9
commit
bcdfd2150d
1 changed files with 7 additions and 2 deletions
|
@ -951,10 +951,15 @@ void GroupCall::markEndpointActive(VideoEndpoint endpoint, bool active) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupCall::markTrackShown(const VideoEndpoint &endpoint, bool shown) {
|
void GroupCall::markTrackShown(const VideoEndpoint &endpoint, bool shown) {
|
||||||
if ((shown && _shownVideoTracks.emplace(endpoint).second)
|
const auto changed = shown
|
||||||
|| (!shown && _shownVideoTracks.remove(endpoint))) {
|
? _shownVideoTracks.emplace(endpoint).second
|
||||||
|
: _shownVideoTracks.remove(endpoint);
|
||||||
|
if (changed) {
|
||||||
_videoStreamShownUpdates.fire_copy({ endpoint, shown });
|
_videoStreamShownUpdates.fire_copy({ endpoint, shown });
|
||||||
}
|
}
|
||||||
|
if (shown && changed && endpoint.type == VideoEndpointType::Screen) {
|
||||||
|
pinVideoEndpoint(endpoint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupCall::rejoin() {
|
void GroupCall::rejoin() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue