mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Chart fixes
This commit is contained in:
parent
0453d6f933
commit
eedcd225f0
19 changed files with 184 additions and 58 deletions
|
|
@ -23,6 +23,7 @@ public enum MessageContentKindKey {
|
|||
case expiredVideo
|
||||
case poll
|
||||
case restricted
|
||||
case dice
|
||||
}
|
||||
|
||||
public enum MessageContentKind: Equatable {
|
||||
|
|
@ -42,6 +43,7 @@ public enum MessageContentKind: Equatable {
|
|||
case expiredVideo
|
||||
case poll(String)
|
||||
case restricted(String)
|
||||
case dice
|
||||
|
||||
public var key: MessageContentKindKey {
|
||||
switch self {
|
||||
|
|
@ -77,6 +79,8 @@ public enum MessageContentKind: Equatable {
|
|||
return .poll
|
||||
case .restricted:
|
||||
return .restricted
|
||||
case .dice:
|
||||
return .dice
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -165,6 +169,8 @@ public func mediaContentKind(_ media: Media, message: Message? = nil, strings: P
|
|||
}
|
||||
case let poll as TelegramMediaPoll:
|
||||
return .poll(poll.text)
|
||||
case _ as TelegramMediaDice:
|
||||
return .dice
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
@ -212,6 +218,8 @@ public func stringForMediaKind(_ kind: MessageContentKind, strings: Presentation
|
|||
return ("📊 \(text)", false)
|
||||
case let .restricted(text):
|
||||
return (text, false)
|
||||
case .dice:
|
||||
return ("🎲", true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue