mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-13 21:10:23 +00:00
yes (#108)
* few player bug fixes (#104)
* icloud safe checking
* more tests
* removed ffmpeg sorry
* test
* Revert "test"
This reverts commit cbf7412d47.
* custom player stuffs idk if it builds
* fire Seiike moment
* ok my fault this time
* Create banner1.png
* seiike ahh moment
* added light mode banner
* Update EpisodeCell.swift
* seiike ahh moment x2
* ops
* fixed intros skipper buttons
* fixed pan crashes
* added speed indicator for hold speed
* added safecheck
* oh yeah my bad
---------
Co-authored-by: Seiike <122684677+Seeike@users.noreply.github.com>
This commit is contained in:
parent
8c73798195
commit
54f2ec5e2a
1 changed files with 15 additions and 11 deletions
|
|
@ -95,20 +95,24 @@ class iCloudSyncManager {
|
|||
}
|
||||
}
|
||||
|
||||
private func syncToiCloud() {
|
||||
let iCloud = NSUbiquitousKeyValueStore.default
|
||||
let defaults = UserDefaults.standard
|
||||
|
||||
do {
|
||||
for key in allKeysToSync() {
|
||||
if let value = defaults.object(forKey: key) {
|
||||
if isValidValueType(value) {
|
||||
iCloud.set(value, forKey: key)
|
||||
func syncToiCloud() {
|
||||
syncQueue.async {
|
||||
do {
|
||||
let container = NSUbiquitousKeyValueStore.default
|
||||
let defaults = UserDefaults.standard
|
||||
|
||||
for key in self.allKeysToSync() {
|
||||
if let value = defaults.object(forKey: key), self.isValidValueType(value) {
|
||||
let data = try JSONSerialization.data(withJSONObject: value)
|
||||
try JSONSerialization.jsonObject(with: data)
|
||||
container.set(value, forKey: key)
|
||||
}
|
||||
}
|
||||
|
||||
container.synchronize()
|
||||
} catch {
|
||||
Logger.shared.log("Failed to sync to iCloud: \(error.localizedDescription)", type: "Error")
|
||||
}
|
||||
|
||||
iCloud.synchronize()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue