瀏覽代碼

Merge pull request #973 from deltachat/make-lint-happier

target some lint warnings
bjoern 4 年之前
父節點
當前提交
84cfe2e4b7

+ 1 - 1
DcCore/DcCore/Helper/DcUtils.swift

@@ -144,7 +144,7 @@ public struct DcUtils {
 		}
 	}
 
-	public static func thumbnailFromPdf(withUrl url:URL, pageNumber:Int = 1, width: CGFloat = 240) -> UIImage? {
+	public static func thumbnailFromPdf(withUrl url: URL, pageNumber: Int = 1, width: CGFloat = 240) -> UIImage? {
 		guard let pdf = CGPDFDocument(url as CFURL),
 			let page = pdf.page(at: pageNumber)
 			else {

+ 2 - 1
deltachat-ios/Controller/DocumentGalleryController.swift

@@ -66,7 +66,8 @@ extension DocumentGalleryController: UITableViewDelegate, UITableViewDataSource
     }
 
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        guard let cell = tableView.dequeueReusableCell(withIdentifier: DocumentGalleryFileCell.reuseIdentifier, for: indexPath) as? DocumentGalleryFileCell else {
+        guard let cell = tableView.dequeueReusableCell(withIdentifier: DocumentGalleryFileCell.reuseIdentifier, for: indexPath)
+                as? DocumentGalleryFileCell else {
             return UITableViewCell()
         }
         let msg = DcMsg(id: fileMessageIds[indexPath.row])

+ 1 - 1
deltachat-ios/Controller/PreviewController.swift

@@ -22,7 +22,7 @@ class PreviewController: QLPreviewController {
         super.init(nibName: nil, bundle: nil)
         dataSource = self
         switch type {
-        case .multi(_,let currentIndex):
+        case .multi(_, let currentIndex):
             currentPreviewItemIndex = currentIndex
         case .single:
             currentPreviewItemIndex = 0

+ 1 - 1
deltachat-ios/Helper/ThumbnailCache.swift

@@ -11,7 +11,7 @@ class ThumbnailCache {
         return cache
     }()
 
-    func storeImage(image: UIImage, key: String){
+    func storeImage(image: UIImage, key: String) {
         cache.setObject(image, forKey: NSString(string: key))
     }
 

+ 0 - 2
deltachat-ios/Helper/Utils.swift

@@ -65,5 +65,3 @@ struct Utils {
         return String(lang)
     }
 }
-
-