Procházet zdrojové kódy

Fix button, fix import path, remove dummy error

Deniz Cengiz před 1 rokem
rodič
revize
d4ade374fe

+ 1 - 1
Model/JSONImporter.swift

@@ -799,7 +799,7 @@ extension JSONImporter {
     func importCarbHistoryIfNeeded() async throws {
         debug(.coreData, "Checking for carb history JSON file...")
 
-        let url = openAPSFileURL(OpenAPS.Monitor.pumpHistory)
+        let url = openAPSFileURL(OpenAPS.Monitor.carbHistory)
         let suffix = "migrated.json"
 
         guard FileManager.default.fileExists(atPath: url.path) else {

+ 0 - 2
Trio/Sources/Application/TrioApp.swift

@@ -176,8 +176,6 @@ extension Notification.Name {
 
         do {
             try await importer.importGlucoseHistoryIfNeeded()
-            // FIXME: for testing, remove
-            throw NSError(domain: "something", code: 1)
         } catch {
             importErrors
                 .append(String(localized: "Failed to import glucose history."))

+ 0 - 2
Trio/Sources/Modules/Main/View/MainMigrationErrorView.swift

@@ -103,13 +103,11 @@ extension Main {
                 Button(action: onConfirm) {
                     Text("I understand! Proceed")
                         .frame(width: UIScreen.main.bounds.width - 60, height: 50)
-                        .font(.title3).bold()
                         .background(
                             Capsule()
                                 .fill(Color.blue)
                         )
                         .foregroundColor(Color.white)
-                        .shadow(color: Color.black.opacity(0.1), radius: 5, x: 0, y: 2)
                 }.padding(.bottom)
             }
         }