mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix channel ownership transfer alert layout
This commit is contained in:
parent
46fd026a2c
commit
bd2b30b51f
@ -5504,3 +5504,5 @@ Any member of this group will be able to see messages in the channel.";
|
|||||||
"ChatList.Context.AddToFolder" = "Add to Folder";
|
"ChatList.Context.AddToFolder" = "Add to Folder";
|
||||||
"ChatList.Context.Back" = "Back";
|
"ChatList.Context.Back" = "Back";
|
||||||
"ChatList.AddedToFolderTooltip" = "%1$@ has been added to folder %2$@";
|
"ChatList.AddedToFolderTooltip" = "%1$@ has been added to folder %2$@";
|
||||||
|
|
||||||
|
"OwnershipTransfer.Transfer" = "Transfer";
|
||||||
|
@ -200,7 +200,7 @@ private final class ArchivedStickersNoticeAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ private final class BotCheckoutPasswordAlertContentNode: AlertContentNode {
|
|||||||
let maxActionWidth: CGFloat = floor(size.width / CGFloat(self.actionNodes.count))
|
let maxActionWidth: CGFloat = floor(size.width / CGFloat(self.actionNodes.count))
|
||||||
let actionTitleInsets: CGFloat = 8.0
|
let actionTitleInsets: CGFloat = 8.0
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionsHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionsHeight))
|
||||||
minActionsWidth += actionTitleSize.width + actionTitleInsets
|
minActionsWidth += actionTitleSize.width + actionTitleInsets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ private final class ChannelOwnershipTransferAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
@ -419,7 +419,7 @@ private func commitChannelOwnershipTransferController(context: AccountContext, p
|
|||||||
|
|
||||||
let contentNode = ChannelOwnershipTransferAlertContentNode(theme: AlertControllerTheme(presentationData: presentationData), ptheme: presentationData.theme, strings: presentationData.strings, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
|
let contentNode = ChannelOwnershipTransferAlertContentNode(theme: AlertControllerTheme(presentationData: presentationData), ptheme: presentationData.theme, strings: presentationData.strings, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
|
||||||
dismissImpl?()
|
dismissImpl?()
|
||||||
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Done, action: {
|
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.OwnershipTransfer_Transfer, action: {
|
||||||
proceedImpl?()
|
proceedImpl?()
|
||||||
})])
|
})])
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ private final class CallRatingAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ private final class CallSuggestTabAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -225,7 +225,7 @@ private final class ChatMessageActionUrlAuthAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ private final class ChatTextLinkEditAlertContentNode: AlertContentNode {
|
|||||||
|
|
||||||
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
var effectiveActionLayout = TextAlertContentActionLayout.horizontal
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
let actionTitleSize = actionNode.titleNode.measure(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
let actionTitleSize = actionNode.titleNode.updateLayout(CGSize(width: maxActionWidth, height: actionButtonHeight))
|
||||||
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
if case .horizontal = effectiveActionLayout, actionTitleSize.height > actionButtonHeight * 0.6667 {
|
||||||
effectiveActionLayout = .vertical
|
effectiveActionLayout = .vertical
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user