Files
2026-01-08 16:13:20 +08:00

26 lines
570 B
Swift

import Library
import SwiftUI
@MainActor
final class SettingViewModel: BaseViewModel {
@Published var taiwanFlagAvailable = false
override init() {
super.init()
isLoading = true
}
nonisolated func checkTaiwanFlagAvailability() async {
let available: Bool
if Variant.screenshotMode {
available = true
} else {
available = !DeviceCensorship.isChinaDevice()
}
await MainActor.run {
taiwanFlagAvailable = available
isLoading = false
}
}
}