mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
b6b5abbc46
commit
f9f9f20141
@ -177,7 +177,9 @@ public class ItemListInviteRequestItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
|
|
||||||
self.bottomStripeNode = ASDisplayNode()
|
self.bottomStripeNode = ASDisplayNode()
|
||||||
self.bottomStripeNode.isLayerBacked = true
|
self.bottomStripeNode.isLayerBacked = true
|
||||||
|
|
||||||
self.maskNode = ASImageNode()
|
self.maskNode = ASImageNode()
|
||||||
|
self.maskNode.isUserInteractionEnabled = false
|
||||||
|
|
||||||
self.extractedBackgroundImageNode = ASImageNode()
|
self.extractedBackgroundImageNode = ASImageNode()
|
||||||
self.extractedBackgroundImageNode.displaysAsynchronously = false
|
self.extractedBackgroundImageNode.displaysAsynchronously = false
|
||||||
@ -671,7 +673,7 @@ public class ItemListInviteRequestItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
strongSelf.topStripeNode.removeFromSupernode()
|
strongSelf.topStripeNode.removeFromSupernode()
|
||||||
}
|
}
|
||||||
if strongSelf.bottomStripeNode.supernode == nil {
|
if strongSelf.bottomStripeNode.supernode == nil {
|
||||||
strongSelf.addSubnode(strongSelf.bottomStripeNode)
|
strongSelf.insertSubnode(strongSelf.bottomStripeNode, at: 0)
|
||||||
}
|
}
|
||||||
if strongSelf.maskNode.supernode != nil {
|
if strongSelf.maskNode.supernode != nil {
|
||||||
strongSelf.maskNode.removeFromSupernode()
|
strongSelf.maskNode.removeFromSupernode()
|
||||||
@ -693,10 +695,10 @@ public class ItemListInviteRequestItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
strongSelf.insertSubnode(strongSelf.topStripeNode, at: 1)
|
strongSelf.insertSubnode(strongSelf.topStripeNode, at: 1)
|
||||||
}
|
}
|
||||||
if strongSelf.bottomStripeNode.supernode == nil {
|
if strongSelf.bottomStripeNode.supernode == nil {
|
||||||
strongSelf.addSubnode(strongSelf.bottomStripeNode)
|
strongSelf.insertSubnode(strongSelf.bottomStripeNode, at: 2)
|
||||||
}
|
}
|
||||||
if strongSelf.maskNode.supernode == nil {
|
if strongSelf.maskNode.supernode == nil {
|
||||||
strongSelf.addSubnode(strongSelf.maskNode)
|
strongSelf.insertSubnode(strongSelf.maskNode, at: 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
let hasCorners = itemListHasRoundedBlockLayout(params)
|
let hasCorners = itemListHasRoundedBlockLayout(params)
|
||||||
@ -765,6 +767,8 @@ public class ItemListInviteRequestItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
shimmerNode = ShimmerEffectNode()
|
shimmerNode = ShimmerEffectNode()
|
||||||
strongSelf.placeholderNode = shimmerNode
|
strongSelf.placeholderNode = shimmerNode
|
||||||
if strongSelf.bottomStripeNode.supernode != nil {
|
if strongSelf.bottomStripeNode.supernode != nil {
|
||||||
|
strongSelf.bottomStripeNode.removeFromSupernode()
|
||||||
|
strongSelf.addSubnode(strongSelf.bottomStripeNode)
|
||||||
strongSelf.insertSubnode(shimmerNode, belowSubnode: strongSelf.bottomStripeNode)
|
strongSelf.insertSubnode(shimmerNode, belowSubnode: strongSelf.bottomStripeNode)
|
||||||
} else {
|
} else {
|
||||||
strongSelf.addSubnode(shimmerNode)
|
strongSelf.addSubnode(shimmerNode)
|
||||||
|
@ -81,9 +81,11 @@ final class JoinLinkPreviewPeerContentNode: ASDisplayNode, ShareContentContainer
|
|||||||
init(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, content: JoinLinkPreviewPeerContentNode.Content) {
|
init(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, content: JoinLinkPreviewPeerContentNode.Content) {
|
||||||
self.avatarNode = AvatarNode(font: avatarFont)
|
self.avatarNode = AvatarNode(font: avatarFont)
|
||||||
self.titleNode = ASTextNode()
|
self.titleNode = ASTextNode()
|
||||||
|
self.titleNode.textAlignment = .center
|
||||||
self.countNode = ASTextNode()
|
self.countNode = ASTextNode()
|
||||||
self.aboutNode = ASTextNode()
|
self.aboutNode = ASTextNode()
|
||||||
self.aboutNode.maximumNumberOfLines = 8
|
self.aboutNode.maximumNumberOfLines = 8
|
||||||
|
self.aboutNode.textAlignment = .center
|
||||||
self.descriptionNode = ASTextNode()
|
self.descriptionNode = ASTextNode()
|
||||||
self.descriptionNode.maximumNumberOfLines = 3
|
self.descriptionNode.maximumNumberOfLines = 3
|
||||||
self.descriptionNode.textAlignment = .center
|
self.descriptionNode.textAlignment = .center
|
||||||
@ -153,7 +155,7 @@ final class JoinLinkPreviewPeerContentNode: ASDisplayNode, ShareContentContainer
|
|||||||
|
|
||||||
if case let .request(isGroup, _, _, about, _) = content {
|
if case let .request(isGroup, _, _, about, _) = content {
|
||||||
if let about = about, !about.isEmpty {
|
if let about = about, !about.isEmpty {
|
||||||
self.aboutNode.attributedText = NSAttributedString(string: about, font: Font.regular(17.0), textColor: theme.actionSheet.primaryTextColor)
|
self.aboutNode.attributedText = NSAttributedString(string: about, font: Font.regular(17.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
|
||||||
self.addSubnode(self.aboutNode)
|
self.addSubnode(self.aboutNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user