PrefUI & PrefWindow // Stop force-unwrapping AppDelegate.
This commit is contained in:
parent
125d79e551
commit
dca93cb6f0
|
@ -88,7 +88,7 @@ struct VwrPrefPaneDictionary: View {
|
||||||
PrefMgr.shared.userDataFolderSpecified = newPath
|
PrefMgr.shared.userDataFolderSpecified = newPath
|
||||||
tbxUserDataPathSpecified = PrefMgr.shared.userDataFolderSpecified
|
tbxUserDataPathSpecified = PrefMgr.shared.userDataFolderSpecified
|
||||||
BookmarkManager.shared.saveBookmark(for: url)
|
BookmarkManager.shared.saveBookmark(for: url)
|
||||||
(NSApp.delegate as! AppDelegate).updateDirectoryMonitorPath()
|
(NSApp.delegate as? AppDelegate)?.updateDirectoryMonitorPath()
|
||||||
} else {
|
} else {
|
||||||
IMEApp.buzz()
|
IMEApp.buzz()
|
||||||
if !bolPreviousFolderValidity {
|
if !bolPreviousFolderValidity {
|
||||||
|
|
|
@ -263,7 +263,7 @@ class CtlPrefWindow: NSWindowController {
|
||||||
if LMMgr.checkIfSpecifiedUserDataFolderValid(newPath) {
|
if LMMgr.checkIfSpecifiedUserDataFolderValid(newPath) {
|
||||||
PrefMgr.shared.userDataFolderSpecified = newPath
|
PrefMgr.shared.userDataFolderSpecified = newPath
|
||||||
BookmarkManager.shared.saveBookmark(for: url)
|
BookmarkManager.shared.saveBookmark(for: url)
|
||||||
(NSApp.delegate as! AppDelegate).updateDirectoryMonitorPath()
|
(NSApp.delegate as? AppDelegate)?.updateDirectoryMonitorPath()
|
||||||
} else {
|
} else {
|
||||||
IMEApp.buzz()
|
IMEApp.buzz()
|
||||||
if !bolPreviousFolderValidity {
|
if !bolPreviousFolderValidity {
|
||||||
|
|
Loading…
Reference in New Issue