Conference calls

This commit is contained in:
Isaac
2025-04-01 17:18:08 +04:00
parent b90065451b
commit 2393424bde
22 changed files with 579 additions and 136 deletions

View File

@@ -7,16 +7,24 @@ import TelegramPresentationData
import BundleIconComponent
final class VideoChatListInviteComponent: Component {
enum Icon {
case addUser
case link
}
let title: String
let icon: Icon
let theme: PresentationTheme
let action: () -> Void
init(
title: String,
icon: Icon,
theme: PresentationTheme,
action: @escaping () -> Void
) {
self.title = title
self.icon = icon
self.theme = theme
self.action = action
}
@@ -25,6 +33,9 @@ final class VideoChatListInviteComponent: Component {
if lhs.title != rhs.title {
return false
}
if lhs.icon != rhs.icon {
return false
}
if lhs.theme !== rhs.theme {
return false
}
@@ -116,10 +127,17 @@ final class VideoChatListInviteComponent: Component {
titleView.bounds = CGRect(origin: CGPoint(), size: titleFrame.size)
}
let iconName: String
switch component.icon {
case .addUser:
iconName = "Chat/Context Menu/AddUser"
case .link:
iconName = "Chat/Context Menu/Link"
}
let iconSize = self.icon.update(
transition: .immediate,
component: AnyComponent(BundleIconComponent(
name: "Chat/Context Menu/AddUser",
name: iconName,
tintColor: component.theme.list.itemAccentColor
)),
environment: {},