Explorar el Código

Merge branch 'dev' into refactoring

Jonas Björkert hace 2 años
padre
commit
9d7819e4fe
Se han modificado 3 ficheros con 87 adiciones y 1 borrados
  1. 81 0
      .gitignore
  2. 1 0
      Config.xcconfig
  3. 5 1
      LoopFollow/Controllers/NightScout.swift

+ 81 - 0
.gitignore

@@ -0,0 +1,81 @@
+# Xcode
+#
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+# macOS
+.DS_Store
+
+## Build generated
+build/
+DerivedData/
+R.generated.swift
+
+## Various settings
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+*.xccheckout
+*.xcscmblueprint
+xcuserdata/
+
+## Other
+*.moved-aside
+*.xccheckout
+*.xcscmblueprint
+
+## Obj-C/Swift specific
+*.hmap
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+# Swift Package Manager
+#
+# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
+# Packages/
+# Package.pins
+# Package.resolved
+.build/
+
+# CocoaPods
+#
+# We recommend against adding the Pods directory to your .gitignore. However
+# you should judge for yourself, the pros and cons are mentioned at:
+# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
+#
+# Pods/
+
+# Carthage
+#
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+# Carthage/Checkouts
+
+Carthage/Build
+
+# IDEA project files
+.idea/*
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/#source-control
+
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots
+fastlane/test_output
+fastlane/FastlaneRunner
+
+LoopFollowConfigOverride.xcconfig

+ 1 - 0
Config.xcconfig

@@ -1,3 +1,4 @@
+#include? "LoopFollowConfigOverride.xcconfig"
 #include? "../../LoopFollowConfigOverride.xcconfig"
 
 //

+ 5 - 1
LoopFollow/Controllers/NightScout.swift

@@ -1194,6 +1194,8 @@ extension MainViewController {
                     bolus.append(entry!)
                 case "Bolus":
                     bolus.append(entry!)
+                case "SMB":
+                    bolus.append(entry!)
                 case "Meal Bolus":
                     carbs.append(entry!)
                     bolus.append(entry!)
@@ -1907,7 +1909,9 @@ extension MainViewController {
             }
             var duration: Double = 5.0
             if let durationType = currentEntry?["durationType"] as? String {
-                duration = dateTimeUtils.getNowTimeIntervalUTC() - dateTimeStamp + (60 * 60)
+                if i == entries.count - 1 {
+                    duration = dateTimeUtils.getNowTimeIntervalUTC() - dateTimeStamp + (60 * 60)
+                }
             } else {
                 duration = (currentEntry?["duration"] as? Double)!
                 duration = duration * 60