Skip to content

Commit

Permalink
🐛 紧急修复,图床配置自定义文件夹保存无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gee1k committed Jul 20, 2019
1 parent 50417a7 commit b549c5a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion uPic/PreferencesWindow/ConfigView/ConfigView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,17 @@ class ConfigView: NSView {
}

@objc func saveHostSettings(notification: Notification) {
self.removeObserver()
guard let userInfo = notification.userInfo else {
print("No userInfo found in notification")
return
}

let domain = userInfo["domain"] as? String ?? ""
let folder = userInfo["folder"] as? String ?? ""
let saveKey = userInfo["saveKey"] as? String ?? HostSaveKey.dateFilename.rawValue

self.data?.setValue(domain, forKey: "domain")
self.data?.setValue(folder, forKey: "folder")
self.data?.setValue(saveKey, forKey: "saveKey")

domainField?.stringValue = domain
Expand Down
16 changes: 16 additions & 0 deletions uPic/PreferencesWindow/ConfigView/Views/CustomConfigView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@ class CustomConfigView: ConfigView {

}

@objc override func saveHostSettings(notification: Notification) {
self.removeObserver()
guard let userInfo = notification.userInfo else {
print("No userInfo found in notification")
return
}

let domain = userInfo["domain"] as? String ?? ""
let saveKey = userInfo["saveKey"] as? String ?? HostSaveKey.dateFilename.rawValue

self.data?.setValue(domain, forKey: "domain")
self.data?.setValue(saveKey, forKey: "saveKey")

domainField?.stringValue = domain
}

@objc func openCustomConfigSheet(_ sender: NSButton) {
guard let data = self.data as? CustomHostConfig else {
return
Expand Down
4 changes: 2 additions & 2 deletions uPic/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.7.3</string>
<string>0.7.4</string>
<key>CFBundleVersion</key>
<string>20190720</string>
<string>20190721</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit b549c5a

Please sign in to comment.