- Bug-Fix: Use LinkedHashMap instead of swift standard dict which preserves insertion order

This commit is contained in:
Magesh K
2025-02-21 19:08:42 +05:30
parent 6370105c85
commit 71212130c5
2 changed files with 2 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ extension AddSourceViewController
class AddSourceViewController: UICollectionViewController
{
private var stagedForAdd: [Source: Bool] = [:]
private var stagedForAdd: LinkedHashMap<Source, Bool> = LinkedHashMap()
private lazy var dataSource = self.makeDataSource()
private lazy var addSourceDataSource = self.makeAddSourceDataSource()
@@ -817,7 +817,7 @@ private extension AddSourceViewController
}
// remove this kv pair
self.stagedForAdd.removeValue(forKey: staged.source)
_ = self.stagedForAdd.removeValue(forKey: staged.source)
}
catch is CancellationError {
isCancelled = true