Search filters

This commit is contained in:
Ilya Laktyushin
2020-09-05 05:37:15 +03:00
parent 91b8eb47d5
commit 0041761cbb
116 changed files with 8857 additions and 5141 deletions

View File

@@ -13,24 +13,6 @@ import WebsiteType
import InstantPageUI
import UrlHandling
enum InstantPageType {
case generic
case album
}
func instantPageType(of webpage: TelegramMediaWebpageLoadedContent) -> InstantPageType {
if let type = webpage.type, type == "telegram_album" {
return .album
}
switch websiteType(of: webpage.websiteName) {
case .instagram, .twitter:
return .album
default:
return .generic
}
}
func instantPageGalleryMedia(webpageId: MediaId, page: InstantPage, galleryMedia: Media) -> [InstantPageGalleryEntry] {
var result: [InstantPageGalleryEntry] = []
var counter: Int = 0