mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Conference calls
This commit is contained in:
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user