From 1636932805698680ced604d182254ba1a12d20b3 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 13 Jun 2021 14:42:49 +0200 Subject: [PATCH] Fix warnings and add Todos --- CapCollector/AppDelegate.swift | 4 +++- CapCollector/Data/Database.swift | 4 ++-- CapCollector/Data/Storage.swift | 2 +- CapCollector/Presentation/SearchAndDisplayAccessory.swift | 2 +- CapCollector/Presentation/SortController.swift | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CapCollector/AppDelegate.swift b/CapCollector/AppDelegate.swift index 87e88cc..c21eea4 100644 --- a/CapCollector/AppDelegate.swift +++ b/CapCollector/AppDelegate.swift @@ -17,7 +17,9 @@ import Reachability #warning("GridController: Reorder caps by dragging") #warning("TableView: Fix blur background of search bar after transition") #warning("TableView: Add banner to jump down to unmatched caps / bottom") - +#warning("Only show total size and percentage for classifier download") +#warning("After classifier download, test is not started") +#warning("Add result info when update button is pressed") var shouldLaunchCamera = false var app: AppDelegate! diff --git a/CapCollector/Data/Database.swift b/CapCollector/Data/Database.swift index 062d013..29a4f24 100644 --- a/CapCollector/Data/Database.swift +++ b/CapCollector/Data/Database.swift @@ -11,7 +11,7 @@ import UIKit import CoreML import SQLite -protocol DatabaseDelegate: class { +protocol DatabaseDelegate: AnyObject { func database(didAddCap cap: Cap) @@ -726,7 +726,7 @@ final class Database { update(uploaded: true, for: cap.id) completed += 1 let total = completed + pendingCapUploadCount - delegate?.database(completedBackgroundWorkItem: "Uploading caps", subtitle: "\(completed + 1) of \(total)") + delegate?.database(completedBackgroundWorkItem: "Uploading caps", subtitle: "\(completed) of \(total)") } return true } diff --git a/CapCollector/Data/Storage.swift b/CapCollector/Data/Storage.swift index ce7dcef..2ca0371 100644 --- a/CapCollector/Data/Storage.swift +++ b/CapCollector/Data/Storage.swift @@ -13,7 +13,7 @@ import Vision -protocol ImageProvider: class { +protocol ImageProvider: AnyObject { func image(for cap: Int) -> UIImage? diff --git a/CapCollector/Presentation/SearchAndDisplayAccessory.swift b/CapCollector/Presentation/SearchAndDisplayAccessory.swift index 0e8917d..97535c0 100644 --- a/CapCollector/Presentation/SearchAndDisplayAccessory.swift +++ b/CapCollector/Presentation/SearchAndDisplayAccessory.swift @@ -16,7 +16,7 @@ class PassthroughView: UIView { } } -protocol CapAccessoryDelegate: class { +protocol CapAccessoryDelegate: AnyObject { func capSearchWasDismissed() diff --git a/CapCollector/Presentation/SortController.swift b/CapCollector/Presentation/SortController.swift index 2af0c7e..fa53586 100644 --- a/CapCollector/Presentation/SortController.swift +++ b/CapCollector/Presentation/SortController.swift @@ -28,7 +28,7 @@ enum SortCriteria: Int { } } -protocol SortControllerDelegate: class { +protocol SortControllerDelegate: AnyObject { func sortController(didSelect sortType: SortCriteria, ascending: Bool) }