Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ public class OSOperationRepo: NSObject {
OneSignalLog.onesignalLog(.LL_VERBOSE, message: "OSOperationRepo flushDeltaQueue in background: \(inBackground) with queue: \(self.deltaQueue)")
}

var index = 0
var unmatched: [OSDelta] = []
for delta in self.deltaQueue {
if let executor = self.deltasToExecutorMap[delta.name] {
executor.enqueueDelta(delta)
self.deltaQueue.remove(at: index)
} else {
// keep in queue if no executor matches, we may not have the executor available yet
index += 1
// Keep if no executor matches yet (module may not have started).
unmatched.append(delta)
}
}
self.deltaQueue = unmatched

// Persist the deltas (including removed deltas) to storage after they are divvy'd up to executors.
OneSignalUserDefaults.initShared().saveCodeableData(forKey: OS_OPERATION_REPO_DELTA_QUEUE_KEY, withValue: self.deltaQueue)
Expand Down
Loading