Fix dashboard refresh

This commit is contained in:
世界
2025-11-26 22:25:48 +08:00
parent 437fe7ac31
commit f5a02d9da0
15 changed files with 32 additions and 65 deletions
@@ -4,7 +4,7 @@ import SwiftUI
@MainActor
public struct ClashModeView: View {
@EnvironmentObject private var commandClient: CommandClient
@EnvironmentObject private var environments: ExtensionEnvironments
@StateObject private var viewModel = ClashModeViewModel()
public init() {}
@@ -29,7 +29,7 @@ public struct ClashModeView: View {
}
.padding([.leading, .trailing])
.onAppear {
viewModel.setCommandClient(commandClient)
viewModel.setCommandClient(environments.commandClient)
}
.alertBinding($viewModel.alert)
}