mastodon-ios/Mastodon/Scene/MediaPreview/Image/MediaPreviewImageViewModel....

40 lines
694 B
Swift
Raw Normal View History

//
// MediaPreviewImageViewModel.swift
// Mastodon
//
// Created by MainasuK Cirno on 2021-4-28.
//
2021-04-30 13:28:06 +02:00
import os.log
import UIKit
import Combine
2021-07-21 13:45:24 +02:00
import Alamofire
import AlamofireImage
import FLAnimatedImage
2022-10-08 07:43:06 +02:00
import MastodonCore
class MediaPreviewImageViewModel {
2021-07-02 13:48:56 +02:00
var disposeBag = Set<AnyCancellable>()
// input
let context: AppContext
let item: ImagePreviewItem
2021-04-30 13:28:06 +02:00
init(context: AppContext, item: ImagePreviewItem) {
self.context = context
self.item = item
}
}
extension MediaPreviewImageViewModel {
public struct ImagePreviewItem {
let assetURL: URL?
let thumbnail: UIImage?
let altText: String?
}
}