mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user