Browse Source

normalized

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
8f3a3485e3

+ 1 - 2
Widget/Toolbar/ToolbarData.swift

@@ -31,7 +31,7 @@ struct ToolbarDataEntry: TimelineEntry {
 }
 
 func getToolbarDataEntry(isPreview: Bool, completion: @escaping (_ entry: ToolbarDataEntry) -> Void) {
-    
+
     if isPreview {
         return completion(ToolbarDataEntry(date: Date(), isPlaceholder: true, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " toolbar"))
     }
@@ -42,4 +42,3 @@ func getToolbarDataEntry(isPreview: Bool, completion: @escaping (_ entry: Toolba
 
     completion(ToolbarDataEntry(date: Date(), isPlaceholder: false, footerImage: "checkmark.icloud", footerText: NCBrandOptions.shared.brand + " toolbar"))
 }
-

+ 8 - 8
Widget/Toolbar/ToolbarWidgetView.swift

@@ -25,17 +25,17 @@ import SwiftUI
 import WidgetKit
 
 struct ToolbarWidgetView: View {
-    
+
     var entry: ToolbarDataEntry
-    
+
     var body: some View {
-        
+
         GeometryReader { geo in
-            
+
             ZStack(alignment: .topLeading) {
-                
+
                 HStack(spacing: 0) {
-                    
+
                     let sizeButton: CGFloat = 65
                     let placeholderColor = Color(white: 0.8)
                     let brandColor = Color(NCBrandColor.shared.brand)
@@ -99,13 +99,13 @@ struct ToolbarWidgetView: View {
                         .scaledToFit()
                         .frame(width: 15, height: 15)
                         .foregroundColor(entry.isPlaceholder ? Color(white: 0.2) : Color(NCBrandColor.shared.brand))
-                    
+
                     Text(entry.footerText)
                         .font(.caption2)
                         .padding(.trailing, 13.0)
                 }
                 .frame(maxWidth: geo.size.width - 5, maxHeight: geo.size.height - 2, alignment: .bottomTrailing)
-            }.background(ContainerRelativeShape().fill(Color.init(.sRGB, red: 0.89, green: 0.89, blue: 0.89, opacity: 0.75)))
+            }.background(ContainerRelativeShape().fill(Color(.sRGB, red: 0.89, green: 0.89, blue: 0.89, opacity: 0.75)))
         }
     }
 }

+ 2 - 2
iOSClient/Extensions/UIControl+Extensions.swift

@@ -27,7 +27,7 @@ import Foundation
 public class ActionClosure {
 
     public let selector: Selector
-    private let closure : (_ sendersender: Any?) -> Void
+    private let closure: (_ sendersender: Any?) -> Void
 
     init(_ attachObj: AnyObject, closure: @escaping (_ sender: Any?) -> Void) {
         self.closure = closure
@@ -41,7 +41,7 @@ public class ActionClosure {
 }
 
 public extension UIControl {
-    func action(for event: UIControl.Event, _ closure : @escaping (_ object: Any?) -> Void) {
+    func action(for event: UIControl.Event, _ closure: @escaping (_ object: Any?) -> Void) {
         let actionClosure = ActionClosure(self, closure: closure)
         self.addTarget(actionClosure, action: actionClosure.selector, for: event)
     }

+ 1 - 1
iOSClient/Menu/NCMenuAction.swift

@@ -192,7 +192,7 @@ extension NCMenuAction {
     /// Set (or remove) a file as *available offline*. Downloads the file if not downloaded already
     static func setAvailableOfflineAction(selectedMetadatas: [tableMetadata], isAnyOffline: Bool, viewController: UIViewController, completion: (() -> Void)? = nil) -> NCMenuAction {
         NCMenuAction(
-            title: isAnyOffline ? NSLocalizedString("_remove_available_offline_", comment: "") :  NSLocalizedString("_set_available_offline_", comment: ""),
+            title: isAnyOffline ? NSLocalizedString("_remove_available_offline_", comment: "") : NSLocalizedString("_set_available_offline_", comment: ""),
             icon: NCUtility.shared.loadImage(named: "tray.and.arrow.down"),
             action: { _ in
                 if !isAnyOffline, selectedMetadatas.count > 3 {

+ 1 - 1
iOSClient/Trash/NCTrash.swift

@@ -276,7 +276,7 @@ extension NCTrash {
     @objc func loadListingTrash() {
 
         let options = NKRequestOptions(queue: NKCommon.shared.backgroundQueue)
-        
+
         NextcloudKit.shared.listingTrash(showHiddenFiles: false, options: options) { account, items, error in
 
             DispatchQueue.main.async { self.refreshControl.endRefreshing() }

+ 1 - 1
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift

@@ -155,7 +155,7 @@ extension NCPlayer {
         NotificationCenter.default.addObserver(self, selector: #selector(deviceRotated(_:)), name: UIDevice.orientationDidChangeNotification, object: nil)
     }
 
-    func loadText(filePath: URL, _ completion:@escaping (_ contents: String?) -> Void) {
+    func loadText(filePath: URL, _ completion: @escaping (_ contents: String?) -> Void) {
         DispatchQueue.global(qos: .background).async {
             guard let data = try? Data(contentsOf: filePath),
                   let encoding = NCUtility.shared.getEncondingDataType(data: data) else {