Various fixes

This commit is contained in:
Ilya Laktyushin
2023-07-02 00:03:00 +02:00
parent e5e5bc1eac
commit d10bf46443
11 changed files with 146 additions and 46 deletions

View File

@@ -1219,7 +1219,7 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable {
var itemHeight = itemWidth
if case let .assets(_, mode) = controller.subject, case .story = mode {
itemHeight = round(itemWidth / 9.0 * 16.0)
itemHeight = 180.0
}
self.gridNode.transaction(GridNodeTransaction(deleteItems: [], insertItems: [], updateItems: [], scrollToItem: nil, updateLayout: GridNodeUpdateLayout(layout: GridNodeLayout(size: bounds.size, insets: gridInsets, scrollIndicatorInsets: nil, preloadSize: itemHeight * 3.0, type: .fixed(itemSize: CGSize(width: itemWidth, height: itemHeight), fillWidth: true, lineSpacing: itemSpacing, itemSpacing: itemSpacing), cutout: cameraRect), transition: transition), itemTransition: .immediate, stationaryItems: .none, updateFirstIndexInSectionOffset: nil, updateOpaqueState: nil, synchronousLoads: false), completion: { [weak self] _ in