mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Video avatar fixes
This commit is contained in:
@@ -22,7 +22,10 @@ final class AuthorizationSequenceSignUpController: ViewController {
|
||||
var initialName: (String, String) = ("", "")
|
||||
private var termsOfService: UnauthorizedAccountTermsOfService?
|
||||
|
||||
var signUpWithName: ((String, String, Data?) -> Void)?
|
||||
var signUpWithName: ((String, String, Data?, URL?, TGVideoEditAdjustments?) -> Void)?
|
||||
|
||||
var avatarUrl: URL?
|
||||
var avatarAdjustments: TGVideoEditAdjustments?
|
||||
|
||||
private let hapticFeedback = HapticFeedback()
|
||||
|
||||
@@ -88,6 +91,12 @@ final class AuthorizationSequenceSignUpController: ViewController {
|
||||
self?.present(c, in: .window(.root), with: a)
|
||||
}, openCurrent: nil, completion: { image in
|
||||
self?.controllerNode.currentPhoto = image
|
||||
self?.avatarUrl = nil
|
||||
self?.avatarAdjustments = nil
|
||||
}, videoCompletion: { image, url, adjustments in
|
||||
self?.controllerNode.currentPhoto = image
|
||||
self?.avatarUrl = url
|
||||
self?.avatarAdjustments = adjustments
|
||||
})
|
||||
})
|
||||
self.displayNodeDidLoad()
|
||||
@@ -150,7 +159,7 @@ final class AuthorizationSequenceSignUpController: ViewController {
|
||||
if let name = name {
|
||||
self.signUpWithName?(name.0, name.1, self.controllerNode.currentPhoto.flatMap({ image in
|
||||
return compressImageToJPEG(image, quality: 0.7)
|
||||
}))
|
||||
}), self.avatarUrl, self.avatarAdjustments)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user