mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +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) {
|
||||
if ((shown && _shownVideoTracks.emplace(endpoint).second)
|
||||
|| (!shown && _shownVideoTracks.remove(endpoint))) {
|
||||
const auto changed = shown
|
||||
? _shownVideoTracks.emplace(endpoint).second
|
||||
: _shownVideoTracks.remove(endpoint);
|
||||
if (changed) {
|
||||
_videoStreamShownUpdates.fire_copy({ endpoint, shown });
|
||||
}
|
||||
if (shown && changed && endpoint.type == VideoEndpointType::Screen) {
|
||||
pinVideoEndpoint(endpoint);
|
||||
}
|
||||
}
|
||||
|
||||
void GroupCall::rejoin() {
|
||||
|
|
Loading…
Add table
Reference in a new issue