Cleanup failed api call when disconnecting

sync2
Laurent 1 year ago
parent 2567df5dd2
commit e8f2b21563
  1. 4
      LeStorage/StoreCenter.swift

@ -112,6 +112,8 @@ public class StoreCenter {
try? self.service().deleteToken()
self.resetApiCalls()
self._failedAPICallsCollection?.reset()
self._settingsStorage.update { settings in
settings.username = nil
settings.userId = nil
@ -151,7 +153,7 @@ public class StoreCenter {
// MARK: - Api Calls
/// Instantiates and loads an ApiCallCollection with the provided type
func loadApiCallCollection<T: Storable>(type: T.Type) {
public func loadApiCallCollection<T: Storable>(type: T.Type) {
let apiCallCollection = ApiCallCollection<T>()
self._apiCallCollections[T.resourceName()] = apiCallCollection
Task {

Loading…
Cancel
Save