Skip to content

Commit

Permalink
Fix toolbar setting in SettingsView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
bummoblizard committed May 4, 2024
1 parent ad65d47 commit 62e10bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CodeApp/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct SettingsView: View {
@AppStorage("preferredColorScheme") var preferredColorScheme: Int = 0
@AppStorage("explorer.showHiddenFiles") var showHiddenFiles: Bool = false
@AppStorage("explorer.confirmBeforeDelete") var confirmBeforeDelete = false
@AppStorage("toolBarEnabled") var toolBarEnabled: Bool = true
@AppStorage("alwaysOpenInNewTab") var alwaysOpenInNewTab: Bool = false
@AppStorage("stateRestorationEnabled") var stateRestorationEnabled = true
@AppStorage("compilerShowPath") var compilerShowPath = false
Expand Down Expand Up @@ -192,9 +191,9 @@ struct SettingsView: View {

Toggle(
"Keyboard Toolbar (Effective in next launch)",
isOn: self.$toolBarEnabled
isOn: $editorOptions.value.toolBarEnabled
).onChange(
of: toolBarEnabled
of: editorOptions.value.toolBarEnabled
) { value in
NotificationCenter.default.post(
name: Notification.Name("toolbarSettingChanged"), object: nil,
Expand Down

0 comments on commit 62e10bc

Please sign in to comment.