|
|
@@ -40,7 +40,7 @@ class LNGameCategoryListView: UIView {
|
|
|
self.categories = categories
|
|
|
collectionView.reloadData()
|
|
|
|
|
|
- runOnMain { [weak self] in
|
|
|
+ DispatchQueue.main.async { [weak self] in
|
|
|
guard let self else { return }
|
|
|
fixBottomSpace()
|
|
|
}
|
|
|
@@ -50,7 +50,7 @@ class LNGameCategoryListView: UIView {
|
|
|
guard let index = categories.firstIndex(where: { $0.code == category.code }) else {
|
|
|
return
|
|
|
}
|
|
|
- runOnMain { [weak self] in
|
|
|
+ DispatchQueue.main.async { [weak self] in
|
|
|
guard let self else { return }
|
|
|
if let headerAttributes = collectionView.layoutAttributesForSupplementaryElement(
|
|
|
ofKind: UICollectionView.elementKindSectionHeader,
|
|
|
@@ -69,7 +69,7 @@ class LNGameCategoryListView: UIView {
|
|
|
let width = (bounds.width - collectionViewLayout.minimumInteritemSpacing) / CGFloat(columns) - collectionViewLayout.minimumInteritemSpacing
|
|
|
collectionViewLayout.itemSize = .init(width: width, height: 68)
|
|
|
|
|
|
- runOnMain { [weak self] in
|
|
|
+ DispatchQueue.main.async { [weak self] in
|
|
|
guard let self else { return }
|
|
|
fixBottomSpace()
|
|
|
}
|