namecolor

This commit is contained in:
Mike Renoir 2023-10-17 09:08:19 +04:00
parent 137c3d9101
commit 194b07d1d8

View File

@ -52,6 +52,18 @@ public extension Peer {
return nil
}
}
var nameColor: PeerNameColor? {
switch self {
case let user as TelegramUser:
return user.nameColor
case let group as TelegramGroup:
return group.nameColor
case let channel as TelegramChannel:
return channel.nameColor
default:
return nil
}
}
var usernames: [TelegramPeerUsername] {
switch self {