mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-30 01:08:02 +00:00
Auto-pin new screencasts.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user