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
680f0a7814
commit
a42d1e860c
@ -144,7 +144,7 @@ func iconForSession(_ session: RecentAccountSession) -> (UIImage?, String?) {
|
||||
if platform.contains("ubuntu") || systemVersion.contains("ubuntu") {
|
||||
return (UIImage(bundleImageName: "Settings/Devices/Ubuntu"), nil)
|
||||
}
|
||||
if platform.contains("linux") || systemVersion.contains("macos") {
|
||||
if platform.contains("linux") || systemVersion.contains("linux") {
|
||||
return (UIImage(bundleImageName: "Settings/Devices/Linux"), nil)
|
||||
}
|
||||
if platform.contains("windows") || systemVersion.contains("windows") {
|
||||
@ -429,7 +429,7 @@ class ItemListRecentSessionItemNode: ItemListRevealOptionsItemNode {
|
||||
}
|
||||
}
|
||||
strongSelf.editableControlNode = editableControlNode
|
||||
strongSelf.insertSubnode(editableControlNode, aboveSubnode: strongSelf.titleNode)
|
||||
strongSelf.insertSubnode(editableControlNode, aboveSubnode: strongSelf.containerNode)
|
||||
editableControlNode.frame = editableControlFrame
|
||||
transition.animatePosition(node: editableControlNode, from: CGPoint(x: -editableControlFrame.size.width / 2.0, y: editableControlFrame.midY))
|
||||
editableControlNode.alpha = 0.0
|
||||
|
@ -130,6 +130,11 @@ class ItemListWebsiteItemNode: ItemListRevealOptionsItemNode {
|
||||
private let appNode: TextNode
|
||||
private let locationNode: TextNode
|
||||
|
||||
private let containerNode: ASDisplayNode
|
||||
override var controlsContainer: ASDisplayNode {
|
||||
return self.containerNode
|
||||
}
|
||||
|
||||
private var layoutParams: (ItemListWebsiteItem, ListViewItemLayoutParams, ItemListNeighbors)?
|
||||
|
||||
private var editableControlNode: ItemListEditableControlNode?
|
||||
@ -179,10 +184,11 @@ class ItemListWebsiteItemNode: ItemListRevealOptionsItemNode {
|
||||
|
||||
super.init(layerBacked: false, dynamicBounce: false, rotated: false, seeThrough: false)
|
||||
|
||||
self.addSubnode(self.avatarNode)
|
||||
self.addSubnode(self.titleNode)
|
||||
self.addSubnode(self.appNode)
|
||||
self.addSubnode(self.locationNode)
|
||||
self.addSubnode(self.containerNode)
|
||||
self.containerNode.addSubnode(self.avatarNode)
|
||||
self.containerNode.addSubnode(self.titleNode)
|
||||
self.containerNode.addSubnode(self.appNode)
|
||||
self.containerNode.addSubnode(self.locationNode)
|
||||
}
|
||||
|
||||
func asyncLayout() -> (_ item: ItemListWebsiteItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, (Bool) -> Void) {
|
||||
@ -328,7 +334,7 @@ class ItemListWebsiteItemNode: ItemListRevealOptionsItemNode {
|
||||
}
|
||||
}
|
||||
strongSelf.editableControlNode = editableControlNode
|
||||
strongSelf.insertSubnode(editableControlNode, aboveSubnode: strongSelf.titleNode)
|
||||
strongSelf.insertSubnode(editableControlNode, aboveSubnode: strongSelf.containerNode)
|
||||
editableControlNode.frame = editableControlFrame
|
||||
transition.animatePosition(node: editableControlNode, from: CGPoint(x: -editableControlFrame.size.width / 2.0, y: editableControlFrame.midY))
|
||||
editableControlNode.alpha = 0.0
|
||||
@ -390,6 +396,7 @@ class ItemListWebsiteItemNode: ItemListRevealOptionsItemNode {
|
||||
strongSelf.maskNode.image = hasCorners ? PresentationResourcesItemList.cornersImage(item.presentationData.theme, top: hasTopCorners, bottom: hasBottomCorners) : nil
|
||||
|
||||
strongSelf.backgroundNode.frame = CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: params.width, height: contentSize.height + min(insets.top, separatorHeight) + min(insets.bottom, separatorHeight)))
|
||||
strongSelf.containerNode.frame = CGRect(origin: CGPoint(), size: strongSelf.backgroundNode.frame.size)
|
||||
strongSelf.maskNode.frame = strongSelf.backgroundNode.frame.insetBy(dx: params.leftInset, dy: 0.0)
|
||||
transition.updateFrame(node: strongSelf.topStripeNode, frame: CGRect(origin: CGPoint(x: 0.0, y: -min(insets.top, separatorHeight)), size: CGSize(width: layoutSize.width, height: separatorHeight)))
|
||||
transition.updateFrame(node: strongSelf.bottomStripeNode, frame: CGRect(origin: CGPoint(x: bottomStripeInset, y: contentSize.height + bottomStripeOffset), size: CGSize(width: layoutSize.width - bottomStripeInset, height: separatorHeight)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user