diff LazyBear/Views/Home/HomeView.swift @ 401:f843c6382529

Add Enumeration to Networks files
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Thu, 20 May 2021 21:04:49 +0200
parents 5c99883c7964
children 5f21f7c23c5e
line wrap: on
line diff
--- a/LazyBear/Views/Home/HomeView.swift	Sat May 15 19:54:20 2021 +0200
+++ b/LazyBear/Views/Home/HomeView.swift	Thu May 20 21:04:49 2021 +0200
@@ -51,7 +51,7 @@
                     }
                 }
                 .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() }  // Start timer
-                .onReceive(timer) { _ in home.request("https://api.lazybear.app/home/type=streaming", isInitRequest: false) }  // Receive timer notification
+                .onReceive(timer) { _ in home.request("https://api.lazybear.app/home/type=streaming", .streaming) }  // Receive timer notification
                 .onDisappear { self.timer.upstream.connect().cancel() }  // Stop timer
                 .navigationTitle("\(dueDate, formatter: Self.taskDateFormat)")
                 .navigationBarTitleDisplayMode(.inline)
@@ -72,7 +72,7 @@
         } else {
             ProgressView()
                 .onAppear {
-                    home.request("https://api.lazybear.app/home/type=init", isInitRequest: true)
+                    home.request("https://api.lazybear.app/home/type=init", .initial)
                 }
 
         }