Set special color for local participants in conference

This commit is contained in:
Christophe Deschamps 2022-09-19 09:46:13 +02:00
parent 89112ccc3e
commit 5e3906e578
4 changed files with 8 additions and 3 deletions

View file

@ -61,6 +61,7 @@ import UIKit
static let voipBackgroundColor = LightDarkColor(voip_gray_blue_color,voip_dark_color)
static let voipBackgroundBWColor = LightDarkColor(UIColor.white,voip_dark_color)
static let voipParticipantBackgroundColor = LightDarkColor(voip_gray_background,voip_dark_color2)
static let voipParticipantMeBackgroundColor = LightDarkColor(voip_gray_background,voip_dark_color3)
static let voipExtraButtonsBackgroundColor = LightDarkColor(voip_gray,voip_dark_color3)
static let voipToolbarBackgroundColor = LightDarkColor(toolbar_color,voip_dark_color4)
static let voipDrawableColor = LightDarkColor(voip_dark_gray,.white)

View file

@ -85,7 +85,8 @@ class VoipActiveSpeakerParticipantCell: UICollectionViewCell {
} else if (data.videoEnabled.value == true) {
self.contentView.backgroundColor = .black
} else {
self.contentView.backgroundColor = VoipTheme.voipParticipantBackgroundColor.get()
self.contentView.backgroundColor = data.isMe ? VoipTheme.voipParticipantMeBackgroundColor.get() : VoipTheme.voipParticipantBackgroundColor.get()
}
// Avatar

View file

@ -73,6 +73,9 @@ class VoipAudioOnlyParticipantCell: UICollectionViewCell {
func updateElements(skipVideo:Bool = false) {
if let data = participantData {
// background
contentView.backgroundColor = data.isMe ? VoipTheme.voipParticipantMeBackgroundColor.get() : VoipTheme.voipParticipantBackgroundColor.get()
// Avatar
self.avatar.isHidden = data.isInConference.value != true && data.isJoining.value != true
@ -105,7 +108,7 @@ class VoipAudioOnlyParticipantCell: UICollectionViewCell {
layer.cornerRadius = corner_radius
clipsToBounds = true
contentView.backgroundColor = VoipTheme.voipParticipantBackgroundColor.get()
layer.borderColor = VoipTheme.primary_color.cgColor
contentView.addSubview(avatar)

View file

@ -87,7 +87,7 @@ class VoipGridParticipantCell: UICollectionViewCell {
} else if (data.videoEnabled.value == true) {
self.contentView.backgroundColor = .black
} else {
self.contentView.backgroundColor = VoipTheme.voipParticipantBackgroundColor.get()
self.contentView.backgroundColor = data.isMe ? VoipTheme.voipParticipantMeBackgroundColor.get() : VoipTheme.voipParticipantBackgroundColor.get()
}
// Avatar