From 2139caf562450b912781059a84a13f7d9e86d573 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 21 Nov 2021 21:22:33 +0400 Subject: [PATCH] Fix link device button --- .../Recent Sessions/RecentSessionsHeaderItem.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsHeaderItem.swift b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsHeaderItem.swift index aa61efb90e..40964505c3 100644 --- a/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsHeaderItem.swift +++ b/submodules/SettingsUI/Sources/Privacy and Security/Recent Sessions/RecentSessionsHeaderItem.swift @@ -152,7 +152,7 @@ class RecentSessionsHeaderItemNode: ListViewItemNode { let buttonWidth = min(375, contentSize.width - params.leftInset - params.rightInset) let buttonHeight = strongSelf.buttonNode.updateLayout(width: buttonWidth, transition: .immediate) - let buttonFrame = CGRect(x: params.leftInset, y: contentSize.height - buttonHeight + 4.0, width: buttonWidth, height: buttonHeight) + let buttonFrame = CGRect(x: floorToScreenPixels((params.width - buttonWidth) / 2.0), y: contentSize.height - buttonHeight + 4.0, width: buttonWidth, height: buttonHeight) strongSelf.buttonNode.frame = buttonFrame strongSelf.accessibilityLabel = attributedText.string