mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-20 09:18:25 +00:00
20 lines
598 B
Swift
20 lines
598 B
Swift
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||
|
|
||
|
import Combine
|
||
|
import Foundation
|
||
|
import Mastodon
|
||
|
import ServiceLayer
|
||
|
|
||
|
public final class CompositionViewModel: ObservableObject {
|
||
|
public let composition: Composition
|
||
|
@Published public private(set) var identification: Identification
|
||
|
|
||
|
init(composition: Composition,
|
||
|
identification: Identification,
|
||
|
identificationPublisher: AnyPublisher<Identification, Never>) {
|
||
|
self.composition = composition
|
||
|
self.identification = identification
|
||
|
identificationPublisher.assign(to: &$identification)
|
||
|
}
|
||
|
}
|