浏览代码

fix

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 3 年之前
父节点
当前提交
11c31727a5
共有 2 个文件被更改,包括 9 次插入3 次删除
  1. 3 1
      Share/NCShareExtension.swift
  2. 6 2
      iOSClient/Main/NCFunctionCenter.swift

+ 3 - 1
Share/NCShareExtension.swift

@@ -127,7 +127,9 @@ class NCShareExtension: UIViewController {
         }
 
         hud.indicatorView = JGProgressHUDRingIndicatorView()
-        (hud.indicatorView as! JGProgressHUDRingIndicatorView).ringWidth = 2
+        if let indicatorView = hud.indicatorView as? JGProgressHUDRingIndicatorView {
+            indicatorView.ringWidth = 1.5
+        }
         
         NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object: nil)
     }

+ 6 - 2
iOSClient/Main/NCFunctionCenter.swift

@@ -364,7 +364,9 @@ import JGProgressHUD
         let hud = JGProgressHUD()
         
         hud.indicatorView = JGProgressHUDRingIndicatorView()
-        (hud.indicatorView as! JGProgressHUDRingIndicatorView).ringWidth = 2
+        if let indicatorView = hud.indicatorView as? JGProgressHUDRingIndicatorView {
+            indicatorView.ringWidth = 1.5
+        }
         hud.show(in: (appDelegate.window?.rootViewController?.view)!)
         hud.textLabel.text = NSLocalizedString("_saving_", comment: "")
         
@@ -470,7 +472,9 @@ import JGProgressHUD
                 let hud = JGProgressHUD()
                 
                 hud.indicatorView = JGProgressHUDRingIndicatorView()
-                (hud.indicatorView as! JGProgressHUDRingIndicatorView).ringWidth = 2
+                if let indicatorView = hud.indicatorView as? JGProgressHUDRingIndicatorView {
+                    indicatorView.ringWidth = 1.5
+                }
                 hud.show(in: (appDelegate.window?.rootViewController?.view)!)
                 hud.textLabel.text = fileName