|
@@ -116,6 +116,9 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
UserDefaults.standard.removeObject(forKey: "inEditorPersonal")
|
|
UserDefaults.standard.removeObject(forKey: "inEditorPersonal")
|
|
NotificationCenter.default.removeObserver(self)
|
|
NotificationCenter.default.removeObserver(self)
|
|
}
|
|
}
|
|
|
|
+ super.viewDidDisappear(true)
|
|
|
|
+ self.removeFromParent()
|
|
|
|
+ self.dismiss(animated: true, completion: nil)
|
|
}
|
|
}
|
|
|
|
|
|
public override func viewDidAppear(_ animated: Bool) {
|
|
public override func viewDidAppear(_ animated: Bool) {
|
|
@@ -4786,7 +4789,8 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
if let dirPath = paths.first {
|
|
if let dirPath = paths.first {
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumbChat)
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumbChat)
|
|
- let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
|
|
+// let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
+ let image = UIGraphicsRenderer.renderImageAt(url: thumbURL as NSURL, size: CGSize(width: 250, height: 250))
|
|
imageThumb.image = image
|
|
imageThumb.image = image
|
|
|
|
|
|
let videoURL = URL(fileURLWithPath: dirPath).appendingPathComponent(videoChat)
|
|
let videoURL = URL(fileURLWithPath: dirPath).appendingPathComponent(videoChat)
|
|
@@ -5200,7 +5204,8 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
if let dirPath = paths.first {
|
|
if let dirPath = paths.first {
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumb_chat)
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumb_chat)
|
|
- let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
|
|
+// let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
+ let image = UIGraphicsRenderer.renderImageAt(url: thumbURL as NSURL, size: CGSize(width: 250, height: 250))
|
|
let imageThumb = UIImageView(image: image)
|
|
let imageThumb = UIImageView(image: image)
|
|
containerReply.addSubview(imageThumb)
|
|
containerReply.addSubview(imageThumb)
|
|
imageThumb.layer.cornerRadius = 2.0
|
|
imageThumb.layer.cornerRadius = 2.0
|
|
@@ -5834,7 +5839,8 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
let paths = NSSearchPathForDirectoriesInDomains(nsDocumentDirectory, nsUserDomainMask, true)
|
|
if let dirPath = paths.first {
|
|
if let dirPath = paths.first {
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumb_chat)
|
|
let thumbURL = URL(fileURLWithPath: dirPath).appendingPathComponent(thumb_chat)
|
|
- let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
|
|
+// let image = UIImage(contentsOfFile: thumbURL.path)
|
|
|
|
+ let image = UIGraphicsRenderer.renderImageAt(url: thumbURL as NSURL, size: CGSize(width: 250, height: 250))
|
|
let imageThumb = UIImageView(image: image)
|
|
let imageThumb = UIImageView(image: image)
|
|
self.containerPreviewReply.addSubview(imageThumb)
|
|
self.containerPreviewReply.addSubview(imageThumb)
|
|
imageThumb.layer.cornerRadius = 2.0
|
|
imageThumb.layer.cornerRadius = 2.0
|