Added selection ring for account avatar in tabbar

Added separate text colors for authorization sequence screens
This commit is contained in:
Ilya Laktyushin
2019-09-20 23:53:46 +03:00
parent 4408dc8f5a
commit 64d2284980
11 changed files with 76 additions and 28 deletions

View File

@@ -17,14 +17,16 @@ public func textAlertController(context: AccountContext, title: String?, text: S
return controller
}
public func richTextAlertController(context: AccountContext, title: NSAttributedString?, text: NSAttributedString, actions: [TextAlertAction], actionLayout: TextAlertContentActionLayout = .horizontal) -> AlertController {
public func richTextAlertController(context: AccountContext, title: NSAttributedString?, text: NSAttributedString, actions: [TextAlertAction], actionLayout: TextAlertContentActionLayout = .horizontal, dismissAutomatically: Bool = true) -> AlertController {
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
let theme = AlertControllerTheme(presentationTheme: presentationData.theme)
var dismissImpl: (() -> Void)?
let controller = AlertController(theme: theme, contentNode: TextAlertContentNode(theme: theme, title: title, text: text, actions: actions.map { action in
return TextAlertAction(type: action.type, title: action.title, action: {
dismissImpl?()
if dismissAutomatically {
dismissImpl?()
}
action.action()
})
}, actionLayout: actionLayout))