Files
Folo/apps/mobile/native/ios/Modules/SharedWebView/WebViewState.swift
T
Whitewater 7afbc5958b refactor: image preview handling on iOS (#3995)
* refactor: use lightbox to preview image on iOS

* refactor: replace atom-based image preview event handling with EventBus

* refactor: replace NotificationCenter with Combine

* chore: clean code
2025-06-24 16:53:27 +08:00

24 lines
479 B
Swift

//
// WebViewState.swift
// FollowNative
//
// Created by Innei on 2025/1/31.
//
import Combine
import UIKit
struct ImagePreviewEvent {
let imageUrls: [String]
let index: Int
}
class WebViewState: ObservableObject {
@Published var contentHeight: CGFloat = UIWindow().bounds.height
@Published var imagePreviewEvent: ImagePreviewEvent?
func previewImages(urls: [String], index: Int) {
imagePreviewEvent = ImagePreviewEvent(imageUrls: urls, index: index)
}
}