mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various fixes
This commit is contained in:
parent
b80f2636d6
commit
4013fca50e
16 changed files with 66 additions and 14 deletions
|
|
@ -26,6 +26,7 @@ public enum MessageContentKindKey {
|
|||
case dice
|
||||
case invoice
|
||||
case story
|
||||
case giveaway
|
||||
}
|
||||
|
||||
public enum MessageContentKind: Equatable {
|
||||
|
|
@ -48,6 +49,7 @@ public enum MessageContentKind: Equatable {
|
|||
case dice(String)
|
||||
case invoice(String)
|
||||
case story
|
||||
case giveaway
|
||||
|
||||
public func isSemanticallyEqual(to other: MessageContentKind) -> Bool {
|
||||
switch self {
|
||||
|
|
@ -165,6 +167,12 @@ public enum MessageContentKind: Equatable {
|
|||
} else {
|
||||
return false
|
||||
}
|
||||
case .giveaway:
|
||||
if case .giveaway = other {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -208,6 +216,8 @@ public enum MessageContentKind: Equatable {
|
|||
return .invoice
|
||||
case .story:
|
||||
return .story
|
||||
case .giveaway:
|
||||
return .giveaway
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -397,6 +407,8 @@ public func stringForMediaKind(_ kind: MessageContentKind, strings: Presentation
|
|||
return (NSAttributedString(string: text), true)
|
||||
case .story:
|
||||
return (NSAttributedString(string: strings.Message_Story), true)
|
||||
case .giveaway:
|
||||
return (NSAttributedString(string: strings.Message_Giveaway), true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue