Files
Folo/apps/mobile/native/ios/SharedWebView/SharedWebView+BridgeData.swift
T
Innei 0011861e3f feat(mobile): enhance iOS image preview with SDWebImage and improved QuickLook handling
- Add SDWebImage dependency to FollowNative.podspec
- Refactor ImagePreview and PreviewControllerController for robust image preview
- Implement dynamic file extension handling for image preview
- Update WebView bridge to support more flexible image preview payload
- Improve MarkdownImage component to use Uint8Array for image conversion

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 17:50:13 +08:00

31 lines
532 B
Swift

//
// SharedWebView+BridgeData.swift
// Pods
//
// Created by Innei on 2025/2/7.
//
import Foundation
private protocol BasePayload {
var type: String { get }
}
struct SetContentHeightPayload: Codable, BasePayload {
var type: String
var payload: CGFloat
}
struct BridgeDataBasePayload: Codable {
var type: String
}
struct PreviewImagePayloadProps: Codable {
var images: [[UInt8]]
var index: Int = 0
}
struct PreviewImagePayload: Codable, BasePayload {
var type: String
var payload: PreviewImagePayloadProps
}