Refactor InstantPageUI and related modules

This commit is contained in:
Peter
2019-08-12 21:15:45 +03:00
parent c0789dffda
commit f151d907d2
138 changed files with 4401 additions and 633 deletions

View File

@@ -0,0 +1,23 @@
import Foundation
import Postbox
import TelegramCore
public struct InstantPageMedia: Equatable {
public let index: Int
public let media: Media
public let url: InstantPageUrlItem?
public let caption: RichText?
public let credit: RichText?
public init(index: Int, media: Media, url: InstantPageUrlItem?, caption: RichText?, credit: RichText?) {
self.index = index
self.media = media
self.url = url
self.caption = caption
self.credit = credit
}
public static func ==(lhs: InstantPageMedia, rhs: InstantPageMedia) -> Bool {
return lhs.index == rhs.index && lhs.media.isEqual(to: rhs.media) && lhs.url == rhs.url && lhs.caption == rhs.caption && lhs.credit == rhs.credit
}
}