Commit 57ba63d8 by Demid Merzlyakov

Comments.

parent 2686098f
...@@ -17,7 +17,7 @@ import OneWeatherCore ...@@ -17,7 +17,7 @@ import OneWeatherCore
import AppsFlyerLib import AppsFlyerLib
import OneWeatherAnalytics import OneWeatherAnalytics
#warning("Fix ASAP")
import WDTWeatherSource import WDTWeatherSource
import BlendHealthSource import BlendHealthSource
import BlendFIPSSource import BlendFIPSSource
...@@ -48,8 +48,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -48,8 +48,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
log.debug("Launch options: -") log.debug("Launch options: -")
} }
log.debug("Work directory: \(NSHomeDirectory())")
//LocationManager //LocationManager
#warning("Fix ASAP") //TODO: introduce dependency management (dependency injection engine coupled with a factory or something of the sort).
LocationManager.shared = LocationManager(weatherUpdateSource: WdtWeatherSource(), LocationManager.shared = LocationManager(weatherUpdateSource: WdtWeatherSource(),
healthSource: BlendHealthSource(), healthSource: BlendHealthSource(),
nwsAlertsManager: NWSAlertsManager(), nwsAlertsManager: NWSAlertsManager(),
......
...@@ -10,6 +10,8 @@ import Foundation ...@@ -10,6 +10,8 @@ import Foundation
/// locations list, selectedIndex, error /// locations list, selectedIndex, error
public typealias StorageCompletion = ([Location]?, Int?, Error?) -> () public typealias StorageCompletion = ([Location]?, Int?, Error?) -> ()
/// Classes implementing this protocol manage storage of the app data. Every Storage class has to guarantee that if you call save(data) and load(data), you'll get your data back (unless any third party interferes with wherever the storage implementation puts its data to).
public protocol Storage { public protocol Storage {
func save(locations: [Location], selectedIndex: Int?) func save(locations: [Location], selectedIndex: Int?)
func load(completion: @escaping StorageCompletion) func load(completion: @escaping StorageCompletion)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment