Various fixes

This commit is contained in:
Ilya Laktyushin 2024-04-30 17:10:36 +04:00
parent 7bc5068570
commit e7df32ca3d
3 changed files with 14 additions and 1 deletions

View File

@ -825,7 +825,7 @@ final class ThemeGridControllerNode: ASDisplayNode {
if let makeGalleryIconLayout, let galleryItem = self.galleryItem as? ItemListPeerActionItem {
(galleryLayout, galleryApply) = makeGalleryIconLayout(galleryItem, params, ItemListNeighbors(top: isChannel ? .none : .sameSection(alwaysPlain: false), bottom: .sameSection(alwaysPlain: !hasCustomWallpaper)))
} else if let makeGalleryLayout, let galleryItem = self.galleryItem as? ItemListActionItem {
(galleryLayout, galleryApply) = makeGalleryLayout(galleryItem, params, ItemListNeighbors(top: isChannel ? .none : .sameSection(alwaysPlain: false), bottom: .sameSection(alwaysPlain: false)))
(galleryLayout, galleryApply) = makeGalleryLayout(galleryItem, params, ItemListNeighbors(top: isChannel ? .none : .sameSection(alwaysPlain: false), bottom: .sameSection(alwaysPlain: true)))
} else {
fatalError()
}

View File

@ -974,6 +974,13 @@ private final class StoryContainerScreenComponent: Component {
}
} else {
if let result = subview.hitTest(self.convert(self.convert(point, to: subview), to: subview), with: event) {
if let environment = self.environment, case .regular = environment.metrics.widthClass {
if result.isDescendant(of: self.backgroundEffectView) {
if let stateValue = self.stateValue, let slice = stateValue.slice, let itemSetView = self.visibleItemSetViews[slice.peer.id] {
return itemSetView.view.view
}
}
}
return result
}
}

View File

@ -4382,6 +4382,12 @@ public final class StoryItemSetContainerComponent: Component {
let captionFrame = CGRect(origin: CGPoint(x: 0.0, y: contentFrame.height - captionSize.height), size: captionSize)
if let captionItemView = captionItem.view.view {
if captionItemView.superview == nil {
if case .regular = component.metrics.widthClass {
self.topContentGradientView.layer.cornerRadius = 12.0
self.topContentGradientView.clipsToBounds = true
captionItemView.layer.cornerRadius = 12.0
captionItemView.clipsToBounds = true
}
self.controlsContainerView.insertSubview(captionItemView, aboveSubview: self.contentDimView)
}
captionItemTransition.setFrame(view: captionItemView, frame: captionFrame)