Fix power mode selection UI
This commit is contained in:
parent
b52cb36bb8
commit
9068539043
@ -56,6 +56,9 @@ struct PowerModePopover: View {
|
||||
.onAppear {
|
||||
selectedConfig = powerModeManager.activeConfiguration
|
||||
}
|
||||
.onChange(of: powerModeManager.activeConfiguration) { newValue in
|
||||
selectedConfig = newValue
|
||||
}
|
||||
}
|
||||
|
||||
private func applySelectedConfiguration() {
|
||||
@ -99,4 +102,4 @@ struct PowerModeRow: View {
|
||||
.background(isSelected ? Color.white.opacity(0.1) : Color.clear)
|
||||
.cornerRadius(4)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,6 +82,9 @@ extension WhisperState {
|
||||
|
||||
if UserDefaults.standard.bool(forKey: PowerModeDefaults.autoRestoreKey) {
|
||||
await PowerModeSessionManager.shared.endSession()
|
||||
await MainActor.run {
|
||||
PowerModeManager.shared.setActiveConfiguration(nil)
|
||||
}
|
||||
}
|
||||
|
||||
await MainActor.run {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user