2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Moved common GroupCall structs to separate file.

This commit is contained in:
23rd
2021-01-14 03:25:59 +03:00
parent 36ad24bfcd
commit 827c950468
8 changed files with 60 additions and 36 deletions

View File

@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "main/main_session.h"
#include "calls/calls_instance.h"
#include "calls/calls_group_call.h"
#include "calls/calls_group_common.h"
#include "core/application.h"
#include "apiwrap.h"
@@ -275,12 +276,13 @@ void GroupCall::applyParticipantsSlice(
&& ((was ? was->speaking : false)
|| (!amInCall
&& (lastActive + speakingAfterActive > now)));
const auto defaultVolume = Calls::Group::kDefaultVolume;
const auto value = Participant{
.user = user,
.date = data.vdate().v,
.lastActive = lastActive,
.ssrc = uint32(data.vsource().v),
.volume = data.vvolume().value_or(kDefaultVolume),
.volume = data.vvolume().value_or(defaultVolume),
.speaking = canSelfUnmute && (was ? was->speaking : false),
.muted = data.is_muted(),
.mutedByMe = data.is_muted_by_you(),