Add avatar expansion in voice chats

This commit is contained in:
Ilya Laktyushin
2021-03-24 02:09:34 +05:00
parent 472699a7af
commit e955b94b67
26 changed files with 6190 additions and 5730 deletions

View File

@@ -408,7 +408,7 @@ private final class VoiceChatTitleEditAlertContentNode: AlertContentNode {
}
}
func voiceChatTitleEditController(sharedContext: SharedAccountContext, account: Account, forceTheme: PresentationTheme?, title: String, text: String, placeholder: String, value: String?, apply: @escaping (String?) -> Void) -> AlertController {
func voiceChatTitleEditController(sharedContext: SharedAccountContext, account: Account, forceTheme: PresentationTheme?, title: String, text: String, placeholder: String, doneButtonTitle: String? = nil, value: String?, apply: @escaping (String?) -> Void) -> AlertController {
var presentationData = sharedContext.currentPresentationData.with { $0 }
if let forceTheme = forceTheme {
presentationData = presentationData.withUpdated(theme: forceTheme)
@@ -419,7 +419,7 @@ func voiceChatTitleEditController(sharedContext: SharedAccountContext, account:
let actions: [TextAlertAction] = [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
dismissImpl?(true)
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Done, action: {
}), TextAlertAction(type: .defaultAction, title: doneButtonTitle ?? presentationData.strings.Common_Done, action: {
applyImpl?()
})]