mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -18,6 +18,7 @@ public enum EngineMedia: Equatable {
|
||||
case webpage(TelegramMediaWebpage)
|
||||
case story(TelegramMediaStory)
|
||||
case giveaway(TelegramMediaGiveaway)
|
||||
case giveawayResults(TelegramMediaGiveawayResults)
|
||||
}
|
||||
|
||||
public extension EngineMedia {
|
||||
@@ -53,6 +54,8 @@ public extension EngineMedia {
|
||||
return story.id
|
||||
case let .giveaway(giveaway):
|
||||
return giveaway.id
|
||||
case let .giveawayResults(giveawayResults):
|
||||
return giveawayResults.id
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +93,8 @@ public extension EngineMedia {
|
||||
self = .story(story)
|
||||
case let giveaway as TelegramMediaGiveaway:
|
||||
self = .giveaway(giveaway)
|
||||
case let giveawayResults as TelegramMediaGiveawayResults:
|
||||
self = .giveawayResults(giveawayResults)
|
||||
default:
|
||||
preconditionFailure()
|
||||
}
|
||||
@@ -127,6 +132,8 @@ public extension EngineMedia {
|
||||
return story
|
||||
case let .giveaway(giveaway):
|
||||
return giveaway
|
||||
case let .giveawayResults(giveawayResults):
|
||||
return giveawayResults
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user