diff --git a/submodules/CallListUI/Sources/CallListControllerNode.swift b/submodules/CallListUI/Sources/CallListControllerNode.swift index 11d047d7f1..d91d3e18db 100644 --- a/submodules/CallListUI/Sources/CallListControllerNode.swift +++ b/submodules/CallListUI/Sources/CallListControllerNode.swift @@ -125,7 +125,7 @@ private func mappedInsertEntries(context: AccountContext, presentationData: Item case let .groupCall(peer, _, isActive): return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListGroupCallItem(presentationData: presentationData, context: context, style: showSettings ? .blocks : .plain, peer: peer, isActive: isActive, editing: false, interaction: nodeInteraction), directionHint: entry.directionHint) case let .messageEntry(topMessage, messages, _, _, dateTimeFormat, editing, hasActiveRevealControls, displayHeader, _): - return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListCallItem(presentationData: presentationData, dateTimeFormat: dateTimeFormat, context: context, style: showSettings ? .blocks : .plain, topMessage: topMessage, messages: messages, editing: editing, revealed: hasActiveRevealControls, displayHeader: displayHeader, interaction: nodeInteraction), directionHint: entry.directionHint) + return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListCallItem(presentationData: presentationData, dateTimeFormat: dateTimeFormat, context: context, style: showSettings ? .blocks : .plain, topMessage: topMessage, messages: messages, editing: editing, revealed: hasActiveRevealControls, displayHeader: displayHeader, interaction: nodeInteraction), directionHint: entry.directionHint) case let .holeEntry(_, theme): return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: CallListHoleItem(theme: theme), directionHint: entry.directionHint) } @@ -876,7 +876,12 @@ final class CallListControllerNode: ASDisplayNode { var insets = layout.insets(options: [.input]) insets.top += max(navigationBarHeight, layout.insets(options: [.statusBar]).top) - let inset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + let inset: CGFloat + if layout.size.width >= 375.0 { + inset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + } else { + inset = 0.0 + } if case .navigation = self.mode { insets.left += inset insets.right += inset diff --git a/submodules/ItemListUI/Sources/ItemListControllerNode.swift b/submodules/ItemListUI/Sources/ItemListControllerNode.swift index 3cad44c565..7cac46a8c7 100644 --- a/submodules/ItemListUI/Sources/ItemListControllerNode.swift +++ b/submodules/ItemListUI/Sources/ItemListControllerNode.swift @@ -473,8 +473,10 @@ open class ItemListControllerNode: ASDisplayNode { var addedInsets: UIEdgeInsets? let inset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) - insets.left += inset - insets.right += inset + if layout.size.width >= 375.0 { + insets.left += inset + insets.right += inset + } addedInsets = UIEdgeInsets(top: 0.0, left: inset, bottom: 0.0, right: inset) if self.rightOverlayNode.supernode == nil { diff --git a/submodules/ItemListUI/Sources/ItemListItem.swift b/submodules/ItemListUI/Sources/ItemListItem.swift index 42b6895952..b78321db72 100644 --- a/submodules/ItemListUI/Sources/ItemListItem.swift +++ b/submodules/ItemListUI/Sources/ItemListItem.swift @@ -148,7 +148,7 @@ public func itemListNeighborsGroupedInsets(_ neighbors: ItemListNeighbors) -> UI } public func itemListHasRoundedBlockLayout(_ params: ListViewItemLayoutParams) -> Bool { - return true + return params.width >= 375.0 } public final class ItemListPresentationData: Equatable { diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 55eaf63bfc..b1a1bbc889 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -6343,7 +6343,12 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate var contentHeight: CGFloat = 0.0 - let sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + let sectionInset: CGFloat + if layout.size.width >= 375.0 { + sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + } else { + sectionInset = 0.0 + } let headerInset: CGFloat if self.isSettings { headerInset = sectionInset @@ -6639,7 +6644,12 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate if let (layout, navigationHeight) = self.validLayout { if !additive { - let sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + let sectionInset: CGFloat + if layout.size.width >= 375.0 { + sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + } else { + sectionInset = 0.0 + } let headerInset: CGFloat if self.isSettings { headerInset = sectionInset @@ -7541,7 +7551,12 @@ private final class PeerInfoNavigationTransitionNode: ASDisplayNode, CustomNavig var topHeight = topNavigationBar.backgroundNode.bounds.height if let (layout, _) = self.screenNode.validLayout { - let sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + let sectionInset: CGFloat + if layout.size.width >= 375.0 { + sectionInset = max(16.0, floor((layout.size.width - 674.0) / 2.0)) + } else { + sectionInset = 0.0 + } let headerInset: CGFloat if screenNode.isSettings { headerInset = sectionInset diff --git a/submodules/WallpaperResources/Sources/WallpaperResources.swift b/submodules/WallpaperResources/Sources/WallpaperResources.swift index e0c14e22a8..f0a2a43f1d 100644 --- a/submodules/WallpaperResources/Sources/WallpaperResources.swift +++ b/submodules/WallpaperResources/Sources/WallpaperResources.swift @@ -1422,7 +1422,7 @@ public func themeIconImage(account: Account, accountManager: AccountManager mapToSignal { generator -> Signal<((UIColor, UIColor?, [UInt32]), [UIColor], [UIColor], UIImage?, Bool, Bool, CGFloat, Int32?), NoError> in - let imageSize = CGSize(width: 120, height: 254) + let imageSize = CGSize(width: 148, height: 320) let imageArguments = TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: imageSize, intrinsicInsets: UIEdgeInsets(), emptyColor: nil, custom: arguments) let context = generator?(imageArguments) let image = context?.generateImage()