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:
@@ -365,14 +365,12 @@ public final class DrawingView: UIView, UIGestureRecognizerDelegate, TGPhotoDraw
|
||||
self.strokeRecognitionTimer?.invalidate()
|
||||
}
|
||||
|
||||
public func setup(withDrawing drawingData: Data!) {
|
||||
public func setup(withDrawing drawingData: Data?) {
|
||||
if let drawingData = drawingData, let image = UIImage(data: drawingData) {
|
||||
self.hasOpaqueData = true
|
||||
self.drawingImage = image
|
||||
self.layer.contents = image.cgImage
|
||||
//let codableElements = try? JSONDecoder().decode([CodableDrawingElement].self, from: drawingData) {
|
||||
//self.elements = codableElements.map { $0.element }
|
||||
//self.commit(reset: true)
|
||||
|
||||
self.updateInternalState()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user