Files
bundesmessenger-ios/RiotSwiftUI/Modules/LocationSharing/LiveLocationLabPromotion/LiveLocationLabPromotionViewModel.swift
T
Mauro Romito 12837d4b89 update license
2024-09-25 12:24:52 +02:00

37 lines
980 B
Swift

//
// Copyright 2022-2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only
// Please see LICENSE in the repository root for full details.
//
import SwiftUI
typealias LiveLocationLabPromotionViewModelType = StateStoreViewModel<LiveLocationLabPromotionViewState, LiveLocationLabPromotionViewAction>
class LiveLocationLabPromotionViewModel: LiveLocationLabPromotionViewModelType, LiveLocationLabPromotionViewModelProtocol {
// MARK: - Properties
// MARK: Private
// MARK: Public
var completion: ((Bool) -> Void)?
// MARK: - Setup
init() {
let bindings = LiveLocationLabPromotionBindings(enableLabFlag: false)
super.init(initialViewState: LiveLocationLabPromotionViewState(bindings: bindings))
}
// MARK: - Public
override func process(viewAction: LiveLocationLabPromotionViewAction) {
switch viewAction {
case .complete:
completion?(state.bindings.enableLabFlag)
}
}
}