mastodon-ios/Mastodon/Scene/Onboarding/Welcome/WelcomeViewModel.swift

31 lines
577 B
Swift
Raw Normal View History

//
// WelcomeViewModel.swift
// Mastodon
//
// Created by Cirno MainasuK on 2021-9-15.
//
import Foundation
import Combine
2022-10-08 07:43:06 +02:00
import MastodonCore
final class WelcomeViewModel {
var disposeBag = Set<AnyCancellable>()
// input
let context: AppContext
// output
@Published var needsShowDismissEntry = false
init(context: AppContext) {
self.context = context
context.authenticationService.$mastodonAuthenticationBoxes
.map { !$0.isEmpty }
.assign(to: &$needsShowDismissEntry)
}
}