mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -9,6 +9,7 @@ public enum TextAlertActionType {
|
||||
case genericAction
|
||||
case defaultAction
|
||||
case destructiveAction
|
||||
case defaultDestructiveAction
|
||||
}
|
||||
|
||||
public struct TextAlertAction {
|
||||
@@ -25,7 +26,11 @@ public struct TextAlertAction {
|
||||
|
||||
public final class TextAlertContentActionNode: HighlightableButtonNode {
|
||||
private var theme: AlertControllerTheme
|
||||
let action: TextAlertAction
|
||||
public var action: TextAlertAction {
|
||||
didSet {
|
||||
self.updateTitle()
|
||||
}
|
||||
}
|
||||
|
||||
private let backgroundNode: ASDisplayNode
|
||||
|
||||
@@ -110,11 +115,11 @@ public final class TextAlertContentActionNode: HighlightableButtonNode {
|
||||
switch self.action.type {
|
||||
case .defaultAction, .genericAction:
|
||||
color = self.actionEnabled ? self.theme.accentColor : self.theme.disabledColor
|
||||
case .destructiveAction:
|
||||
case .destructiveAction, .defaultDestructiveAction:
|
||||
color = self.actionEnabled ? self.theme.destructiveColor : self.theme.disabledColor
|
||||
}
|
||||
switch self.action.type {
|
||||
case .defaultAction:
|
||||
case .defaultAction, .defaultDestructiveAction:
|
||||
font = Font.semibold(theme.baseFontSize)
|
||||
case .destructiveAction, .genericAction:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user