diff LazyBear/ContentView.swift @ 457:c6913f0ce46e

Minor UI Updates
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Mon, 28 Jun 2021 14:03:50 +0200
parents 37c13ebda381
children 783b567800d9
line wrap: on
line diff
--- a/LazyBear/ContentView.swift	Mon Jun 28 12:51:06 2021 +0200
+++ b/LazyBear/ContentView.swift	Mon Jun 28 14:03:50 2021 +0200
@@ -48,25 +48,25 @@
      3) Prepare haptics
      */
     private func onAppear() {
-        // Create watchlist
-        if watchlistCompanies.isEmpty {
-            let defaultCompanies: [DefaultCompanyModel] = parseJSON("DefaultCompanies.json")
-            for defaultCompany in defaultCompanies {
-                let watchlistCompany = WatchlistCompany(context: moc)
-                watchlistCompany.name = defaultCompany.name
-                watchlistCompany.symbol = defaultCompany.symbol
-                watchlistCompany.watchlistName = "Default watchlist"
-            }
-            
-            do {
-                try moc.save()
-                print("Default watchlist created")
-            } catch {
-                print(error.localizedDescription)
-            }
-        }
+        // MARK: - Create Watchlist
+//        if watchlistCompanies.isEmpty {
+//            let defaultCompanies: [DefaultCompanyModel] = parseJSON("DefaultCompanies.json")
+//            for defaultCompany in defaultCompanies {
+//                let watchlistCompany = WatchlistCompany(context: moc)
+//                watchlistCompany.name = defaultCompany.name
+//                watchlistCompany.symbol = defaultCompany.symbol
+//                watchlistCompany.watchlistName = "Default watchlist"
+//            }
+//
+//            do {
+//                try moc.save()
+//                print("Default watchlist created")
+//            } catch {
+//                print(error.localizedDescription)
+//            }
+//        }
         
-        // Show WelcomeView if is the first time that the app is opened
+        // MARK: - Show WelcomeView if is the first time that the app is opened
 //        let defaults = UserDefaults.standard
 //
 //        if let isAppAlreadyLaunchedOnce = defaults.string(forKey: "IsAppAlreadyLaunchedOnce") {
@@ -74,7 +74,7 @@
 //            self.showWelcome = true
 //        }
         
-        // Prepare haptics
+        // MARK: - Prepare Haptics
 //        hapticsManager.prepareHaptics()
     }
 }