Unify DashboardViewModel instances
This commit is contained in:
@@ -3,10 +3,13 @@ import Library
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
final class ServiceLogViewModel: ObservableObject {
|
||||
@Published var isLoading = true
|
||||
final class ServiceLogViewModel: BaseViewModel {
|
||||
@Published var content = ""
|
||||
@Published var alert: AlertState?
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
isLoading = true
|
||||
}
|
||||
|
||||
var isEmpty: Bool {
|
||||
content.isEmpty
|
||||
|
||||
@@ -2,10 +2,14 @@ import Library
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
final class SettingViewModel: ObservableObject {
|
||||
@Published var isLoading = true
|
||||
final class SettingViewModel: BaseViewModel {
|
||||
@Published var taiwanFlagAvailable = false
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
isLoading = true
|
||||
}
|
||||
|
||||
nonisolated func checkTaiwanFlagAvailability() async {
|
||||
let available: Bool
|
||||
if ApplicationLibrary.inPreview {
|
||||
|
||||
Reference in New Issue
Block a user