mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[cleanup]: Disable patrons related stuff as it is non-functional
This commit is contained in:
@@ -593,30 +593,30 @@ extension AppManager
|
|||||||
|
|
||||||
func updatePatronsIfNeeded()
|
func updatePatronsIfNeeded()
|
||||||
{
|
{
|
||||||
guard self.operationQueue.operations.allSatisfy({ !($0 is UpdatePatronsOperation) }) else {
|
// guard self.operationQueue.operations.allSatisfy({ !($0 is UpdatePatronsOperation) }) else {
|
||||||
// There's already an UpdatePatronsOperation running.
|
// // There's already an UpdatePatronsOperation running.
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
self.updatePatronsResult = nil
|
// self.updatePatronsResult = nil
|
||||||
|
//
|
||||||
let updatePatronsOperation = UpdatePatronsOperation()
|
// let updatePatronsOperation = UpdatePatronsOperation()
|
||||||
updatePatronsOperation.resultHandler = { (result) in
|
// updatePatronsOperation.resultHandler = { (result) in
|
||||||
do
|
// do
|
||||||
{
|
// {
|
||||||
try result.get()
|
// try result.get()
|
||||||
self.updatePatronsResult = .success(())
|
// self.updatePatronsResult = .success(())
|
||||||
}
|
// }
|
||||||
catch
|
// catch
|
||||||
{
|
// {
|
||||||
print("Error updating Friend Zone Patrons:", error)
|
// print("Error updating Friend Zone Patrons:", error)
|
||||||
self.updatePatronsResult = .failure(error)
|
// self.updatePatronsResult = .failure(error)
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
NotificationCenter.default.post(name: AppManager.didUpdatePatronsNotification, object: self)
|
// NotificationCenter.default.post(name: AppManager.didUpdatePatronsNotification, object: self)
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
self.run([updatePatronsOperation], context: nil)
|
// self.run([updatePatronsOperation], context: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateAllSources(completion: @escaping (Result<Void, Error>) -> Void)
|
func updateAllSources(completion: @escaping (Result<Void, Error>) -> Void)
|
||||||
@@ -634,6 +634,9 @@ extension AppManager
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
let (_, context) = try result.get()
|
let (_, context) = try result.get()
|
||||||
|
// print("\n\n\n\(context.insertedObjects)\n\n\n")
|
||||||
|
// print("\n\n\n\(context.updatedObjects)\n\n\n")
|
||||||
|
// print("\n\n\n\(context.deletedObjects)\n\n\n")
|
||||||
try context.save()
|
try context.save()
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|||||||
Reference in New Issue
Block a user