Skip to content

Commit

Permalink
Rebuild menu when shortcuts changes are saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cabanero authored and yury committed Oct 6, 2021
1 parent 8aa266a commit 3dff70c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions Blink/KBTracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class KBTracker {

try? data.write(to: url, options: .atomicWrite)
input?.configure(config)
UIMenuSystem.main.setNeedsRebuild()
}

func attach(input: SmarterTermInput?) {
Expand Down
2 changes: 0 additions & 2 deletions KB/Native/Views/ShortcutsConfigView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ struct ShortcutConfigView: View {
.background(KeyCaptureView(shortcut: shortcut))
.onReceive(shortcut.objectWillChange, perform: {
config.objectWillChange.send()
UIMenuSystem.main.setNeedsRebuild()
})

}
Expand Down Expand Up @@ -271,6 +270,5 @@ struct ShortcutsConfigView: View {
for v in toDelete {
self.config.shortcuts.removeAll(where: {$0 === v})
}
UIMenuSystem.main.setNeedsRebuild()
}
}

0 comments on commit 3dff70c

Please sign in to comment.