Skip to content

Commit 573c886

Browse files
committed
Merge branch 'investigate-crash-in-locationdatasource-ios-567'
2 parents 679d6d1 + a1fcb52 commit 573c886

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ final class LocationDataSource: UITableViewDiffableDataSource<LocationSection, L
8585
return
8686
}
8787

88-
DispatchQueue.main.async {
89-
if searchString.isEmpty {
90-
self.setSelectedItem(self.selectedItem, animated: false, completion: {
91-
self.scrollToSelectedRelay()
92-
})
93-
} else {
94-
self.scrollToTop(animated: false)
95-
}
88+
if searchString.isEmpty {
89+
self.setSelectedItem(self.selectedItem, animated: false, completion: {
90+
self.scrollToSelectedRelay()
91+
})
92+
} else {
93+
self.scrollToTop(animated: false)
9694
}
9795
}
9896
}
@@ -134,7 +132,9 @@ final class LocationDataSource: UITableViewDiffableDataSource<LocationSection, L
134132
}
135133
}
136134

137-
apply(snapshot, animatingDifferences: animated, completion: completion)
135+
DispatchQueue.main.async {
136+
self.apply(snapshot, animatingDifferences: animated, completion: completion)
137+
}
138138
}
139139

140140
private func registerClasses() {

0 commit comments

Comments
 (0)