Conversation
Might be redundant, but better safe than sorry.
a4ffb93 to
2093918
Compare
|
So the update items are already sorted before doing the concurrent dispatch. It's kind of brute force approach to lose order by inserting delta updates in any order and then re-sort all of them again later by enumerating through all potential objects. Also the code cannot assume the versions are integers (see A simpler approach I think is just to opportunistically add the delta item before the dispatch. Remove it if we need to mark the delta as ignored (by finding the firstIndex() and then remove()). That will have to be synchronized in the DispatchQueue.main.async. No need to re-sort again. |
|
Oh yeah, this is much nicer! I ended up using I test on the Retcon appcast again, and also tried artificially making some deltas not have a signature; both the ordering and filtering seem to work. |
Greatest deltaFrom value first. Also, fix inserting deltas that should have been ignored.
|
OK, changes applied. |
|
Works for me locally. Merging. Thanks! |
|
Great! Thank you for making these final changes, I was a bit busy. |
Makes order of deltas stable in appcasts generated by generate_appcast.
Also (probably?) makes the insertion of new deltas thread-safe.
Fixes #2846.
I tested and verified my change by using one or multiple of these methods:
Checked updating the Retcon appcast with the new code.
macOS version tested: 26.3