Skip to content

Commit

Permalink
Merge pull request #23 from finn-no/clean-up-non-attended-todos
Browse files Browse the repository at this point in the history
Clean up non-attended TODOs
  • Loading branch information
3lvis authored Oct 25, 2017
2 parents e6d6344 + 655609e commit 17f12f4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
6 changes: 2 additions & 4 deletions Finjinon/CaptureManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CaptureManager: NSObject {
}
}

func captureImage(_ completion: @escaping (Data, NSDictionary) -> Void) { // TODO: throws
func captureImage(_ completion: @escaping (Data, NSDictionary) -> Void) {
captureQueue.async {
guard let connection = self.stillImageOutput?.connection(withMediaType: AVMediaTypeVideo) else {
return
Expand All @@ -112,8 +112,7 @@ class CaptureManager: NSObject {
}
}
} else {
NSLog("Failed capturing still imagE: \(String(describing: error))")
// TODO:
NSLog("Failed capturing still images: \(String(describing: error))")
}
})
}
Expand Down Expand Up @@ -202,7 +201,6 @@ class CaptureManager: NSObject {
if self.session.canAddInput(input) {
self.session.addInput(input)
} else {
// TODO: handle?
NSLog("failed to add input \(input) to session \(self.session)")
}
} catch let error1 as NSError {
Expand Down
2 changes: 0 additions & 2 deletions Finjinon/PhotoCaptureViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ open class PhotoCaptureViewController: UIViewController, PhotoCollectionViewLayo

view.backgroundColor = UIColor.black

// TODO: Move all the boring view setup to a storyboard/xib

previewView = UIView(frame: view.bounds)
previewView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(previewView)
Expand Down
2 changes: 0 additions & 2 deletions Finjinon/PhotoCollectionViewLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ internal class PhotoCollectionViewLayout: UICollectionViewFlowLayout, UIGestureR
case .changed:
if let proxy = dragProxy {
proxy.center.x = proxy.initialCenter.x + translation.x
// TODO: Constrain to be within collectionView.frame:
// proxy.center.y = proxy.originalCenter.y + translation.y

if let fromIndexPath = proxy.dragIndexPath,
let toIndexPath = collectionView!.indexPathForItem(at: proxy.center),
Expand Down
5 changes: 1 addition & 4 deletions Finjinon/PhotoStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ public enum AssetImageDataSourceTypes {
case camera, library, unknown
}

// TODO: also support ALAsset/PHPhoto

public struct Asset: Equatable, CustomStringConvertible {
public let UUID = Foundation.UUID().uuidString
let storage: PhotoStorage
Expand Down Expand Up @@ -101,7 +99,6 @@ open class PhotoStorage {
} catch let error1 as NSError {
error = error1
NSLog("Failed to write image to \(cacheURL): \(String(describing: error))")
// TODO: throw
} catch {
fatalError()
}
Expand Down Expand Up @@ -226,7 +223,7 @@ open class PhotoStorage {
completion(thumbnailImage)
}
}
} // TODO: else throws
}
}
}

Expand Down

0 comments on commit 17f12f4

Please sign in to comment.