|
@@ -2657,7 +2657,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
let auto = UserDefaults.standard.bool(forKey: "autoDownload")
|
|
let auto = UserDefaults.standard.bool(forKey: "autoDownload")
|
|
if auto {
|
|
if auto {
|
|
if dataMessages[index]["image_id"] as? String != nil && !((dataMessages[index]["image_id"] as? String)!.isEmpty) {
|
|
if dataMessages[index]["image_id"] as? String != nil && !((dataMessages[index]["image_id"] as? String)!.isEmpty) {
|
|
- Download().start(forKey:dataMessages[index]["image_id"] as! String) { (name, progress) in
|
|
|
|
|
|
+ Download().startHTTP(forKey:dataMessages[index]["image_id"] as! String) { (name, progress) in
|
|
guard progress == 100 else {
|
|
guard progress == 100 else {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -5331,7 +5331,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
y: sender.imageView.frame.height/2)
|
|
y: sender.imageView.frame.height/2)
|
|
activityIndicator.startAnimating()
|
|
activityIndicator.startAnimating()
|
|
sender.imageView.addSubview(activityIndicator)
|
|
sender.imageView.addSubview(activityIndicator)
|
|
- Download().start(forKey: sender.image_id) { (name, progress) in
|
|
|
|
|
|
+ Download().startHTTP(forKey: sender.image_id) { (name, progress) in
|
|
guard progress == 100 else {
|
|
guard progress == 100 else {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -5393,7 +5393,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
imageDownload.centerYAnchor.constraint(equalTo: sender.imageView.centerYAnchor).isActive = true
|
|
imageDownload.centerYAnchor.constraint(equalTo: sender.imageView.centerYAnchor).isActive = true
|
|
imageDownload.widthAnchor.constraint(equalToConstant: 30).isActive = true
|
|
imageDownload.widthAnchor.constraint(equalToConstant: 30).isActive = true
|
|
imageDownload.heightAnchor.constraint(equalToConstant: 30).isActive = true
|
|
imageDownload.heightAnchor.constraint(equalToConstant: 30).isActive = true
|
|
- Download().start(forKey: sender.video_id) { (name, progress) in
|
|
|
|
|
|
+ Download().startHTTP(forKey: sender.video_id) { (name, progress) in
|
|
DispatchQueue.main.async {
|
|
DispatchQueue.main.async {
|
|
guard progress == 100 else {
|
|
guard progress == 100 else {
|
|
shapeLoading.strokeEnd = CGFloat(progress / 100)
|
|
shapeLoading.strokeEnd = CGFloat(progress / 100)
|
|
@@ -5464,7 +5464,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
imageupload.centerYAnchor.constraint(equalTo: containerLoading.centerYAnchor).isActive = true
|
|
imageupload.centerYAnchor.constraint(equalTo: containerLoading.centerYAnchor).isActive = true
|
|
imageupload.centerXAnchor.constraint(equalTo: containerLoading.centerXAnchor).isActive = true
|
|
imageupload.centerXAnchor.constraint(equalTo: containerLoading.centerXAnchor).isActive = true
|
|
|
|
|
|
- Download().start(forKey: sender.file_id) { (name, progress) in
|
|
|
|
|
|
+ Download().startHTTP(forKey: sender.file_id) { (name, progress) in
|
|
DispatchQueue.main.async {
|
|
DispatchQueue.main.async {
|
|
guard progress == 100 else {
|
|
guard progress == 100 else {
|
|
shapeLoading.strokeEnd = CGFloat(progress / 100)
|
|
shapeLoading.strokeEnd = CGFloat(progress / 100)
|