1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-10-27 18:34:58 +03:00

GH-220 Set feed url correctly

This commit is contained in:
Tae Won Ha 2016-10-14 23:01:24 +02:00
parent 992f15096a
commit 237e4a9ddd
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -68,10 +68,20 @@ class PrefStore: StandardFlow {
self.userDefaults.setValue(self.prefsDict(self.data), forKey: PrefStore.compatibleVersion)
}
if self.data.advanced.useSnapshotUpdateChannel {
SUUpdater.shared().feedURL = URL(
string: "https://raw.githubusercontent.com/qvacua/vimr/master/appcast_snapshot.xml"
)
self.setSparkleUrl()
}
fileprivate func setSparkleUrl() {
DispatchUtils.gui {
if self.data.advanced.useSnapshotUpdateChannel {
SUUpdater.shared().feedURL = URL(
string: "https://raw.githubusercontent.com/qvacua/vimr/master/appcast_snapshot.xml"
)
} else {
SUUpdater.shared().feedURL = URL(
string: "https://raw.githubusercontent.com/qvacua/vimr/master/appcast.xml"
)
}
}
}
@ -180,6 +190,7 @@ class PrefStore: StandardFlow {
}
self.userDefaults.setValue(self.prefsDict(self.data), forKey: PrefStore.compatibleVersion)
self.setSparkleUrl()
self.publish(event: self.data)
})
}