feat(recommendation): 추천 서브 배너와 연속 순환을 추가한다

This commit is contained in:
Yu Sung
2026-10-30 12:19:00 +09:00
parent 88f923072c
commit 5dcd0f0104
18 changed files with 1045 additions and 2 deletions
@@ -0,0 +1,28 @@
import Foundation
#if canImport(UIKit)
import UIKit
#endif
enum SubBannerLinkOpener {
static func open(_ banner: SubBanner, using opener: @escaping (URL, @escaping (Bool) -> Void) -> Void) {
let webURL = banner.webURL
if let iosURL = banner.iosURL {
opener(iosURL) { opened in
if !opened, let webURL {
opener(webURL) { _ in }
}
}
} else if let webURL {
opener(webURL) { _ in }
}
}
#if canImport(UIKit)
static func open(_ banner: SubBanner) {
open(banner) { url, completion in
UIApplication.shared.open(url, options: [:], completionHandler: completion)
}
}
#endif
}