Browse Source

Snoozer details

Jonas Björkert 1 year ago
parent
commit
9c1b6adda7

+ 4 - 0
LoopFollow.xcodeproj/project.pbxproj

@@ -108,6 +108,8 @@
 		DDB0AF522BB1A8BE00AFA48B /* BuildDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB0AF512BB1A8BE00AFA48B /* BuildDetails.swift */; };
 		DDB0AF552BB1B24A00AFA48B /* BuildDetails.plist in Resources */ = {isa = PBXBuildFile; fileRef = DDB0AF542BB1B24A00AFA48B /* BuildDetails.plist */; };
 		DDBE3ABD2CB5A961006B37DC /* OverrideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBE3ABC2CB5A961006B37DC /* OverrideView.swift */; };
+		DDC7E5152DBCFA7900EB1127 /* SnoozerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC7E5132DBCE1B900EB1127 /* SnoozerViewController.swift */; };
+		DDC7E5162DBCFA7F00EB1127 /* SnoozerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC7E5122DBCE1B900EB1127 /* SnoozerView.swift */; };
 		DDCF979424C0D380002C9752 /* UIViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCF979324C0D380002C9752 /* UIViewExtension.swift */; };
 		DDCF979624C1443C002C9752 /* GeneralSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCF979524C1443C002C9752 /* GeneralSettingsViewController.swift */; };
 		DDCF979824C1489C002C9752 /* GraphSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCF979724C1489C002C9752 /* GraphSettingsViewController.swift */; };
@@ -1590,6 +1592,7 @@
 				DD608A0A2C23593900F91132 /* SMB.swift in Sources */,
 				DDCF979824C1489C002C9752 /* GraphSettingsViewController.swift in Sources */,
 				FC3AE7B5249E8E0E00AAE1E0 /* LoopFollow.xcdatamodeld in Sources */,
+				DDC7E5152DBCFA7900EB1127 /* SnoozerViewController.swift in Sources */,
 				DDDF6F492D479AF000884336 /* NoRemoteView.swift in Sources */,
 				FCC6886F2489A53800A0279D /* AppConstants.swift in Sources */,
 				DD7E19842ACDA50C00DBD158 /* Overrides.swift in Sources */,
@@ -1623,6 +1626,7 @@
 				DDEF503A2D31615000999A5D /* LogManager.swift in Sources */,
 				DD4878172C7B75350048F05C /* BolusView.swift in Sources */,
 				DD493AE72ACF23CF009A6922 /* DeviceStatus.swift in Sources */,
+				DDC7E5162DBCFA7F00EB1127 /* SnoozerView.swift in Sources */,
 				FCFEECA2248857A600402A7F /* SettingsViewController.swift in Sources */,
 				DD4AFB612DB68BBC00BB593F /* AlarmListView.swift in Sources */,
 				DD7B0D442D730A3B0063DCB6 /* CycleHelper.swift in Sources */,

+ 15 - 154
LoopFollow/Application/Base.lproj/Main.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
     <device id="retina6_5" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -13,13 +13,13 @@
         <!--Home-->
         <scene sceneID="hNz-n2-bh7">
             <objects>
-                <viewController id="9pv-A4-QxB" userLabel="Home" customClass="MainViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController id="9pv-A4-QxB" userLabel="Home" customClass="MainViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <stackView opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="250" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="mJy-Ly-Jze">
-                                <rect key="frame" x="8" y="52" width="398" height="339"/>
+                                <rect key="frame" x="8" y="96" width="398" height="339"/>
                                 <subviews>
                                     <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Ptf-fu-Ue4" userLabel="BGview">
                                         <rect key="frame" x="0.0" y="0.0" width="144.66666666666666" height="339"/>
@@ -114,21 +114,21 @@
                                 </subviews>
                             </stackView>
                             <stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="1000" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="751-02-Xte">
-                                <rect key="frame" x="8" y="399" width="398" height="406"/>
+                                <rect key="frame" x="8" y="443" width="398" height="328"/>
                                 <subviews>
                                     <view contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="51B-JU-npv" customClass="LineChartView" customModule="Charts">
-                                        <rect key="frame" x="0.0" y="0.0" width="398" height="250"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="398" height="172"/>
                                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                     </view>
                                     <view autoresizesSubviews="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="Nml-lr-dgQ" userLabel="BGChartFull" customClass="LineChartView" customModule="Charts">
-                                        <rect key="frame" x="0.0" y="258" width="398" height="40"/>
+                                        <rect key="frame" x="0.0" y="180" width="398" height="40"/>
                                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="40" id="qmO-ga-QWl"/>
                                         </constraints>
                                     </view>
                                     <view contentMode="scaleToFill" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="ikj-at-auF" userLabel="statsView">
-                                        <rect key="frame" x="0.0" y="306" width="398" height="100"/>
+                                        <rect key="frame" x="0.0" y="228" width="398" height="100"/>
                                         <subviews>
                                             <stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="XsT-6R-Vym">
                                                 <rect key="frame" x="0.0" y="0.0" width="398" height="100"/>
@@ -321,150 +321,14 @@
         <!--Snoozer-->
         <scene sceneID="gSd-1V-vbL">
             <objects>
-                <viewController id="e0E-cx-0Wr" customClass="SnoozeViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController id="e0E-cx-0Wr" customClass="SnoozerViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="oqe-Oz-Hai">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ZaU-Ss-piB" userLabel="BGview">
-                                <rect key="frame" x="8" y="94" width="398" height="711"/>
-                                <subviews>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BG" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iq3-I1-HX0">
-                                        <rect key="frame" x="0.0" y="0.0" width="398" height="167.33333333333334"/>
-                                        <fontDescription key="fontDescription" type="system" weight="black" pointSize="220"/>
-                                        <nil key="textColor"/>
-                                        <nil key="highlightedColor"/>
-                                        <variation key="heightClass=regular-widthClass=compact">
-                                            <fontDescription key="fontDescription" type="system" weight="black" pointSize="140"/>
-                                        </variation>
-                                    </label>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="--" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hLM-Es-BOa" userLabel="Direction">
-                                        <rect key="frame" x="0.0" y="167.33333333333331" width="398" height="95.666666666666686"/>
-                                        <fontDescription key="fontDescription" type="system" weight="black" pointSize="110"/>
-                                        <nil key="textColor"/>
-                                        <nil key="highlightedColor"/>
-                                        <variation key="heightClass=regular-widthClass=compact">
-                                            <fontDescription key="fontDescription" type="system" weight="black" pointSize="80"/>
-                                        </variation>
-                                    </label>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Delta" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YCF-22-z3g" userLabel="Delta">
-                                        <rect key="frame" x="0.0" y="263" width="398" height="77.666666666666686"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="70"/>
-                                        <nil key="textColor"/>
-                                        <color key="highlightedColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <variation key="heightClass=regular-widthClass=compact">
-                                            <fontDescription key="fontDescription" type="system" pointSize="65"/>
-                                        </variation>
-                                    </label>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MinAgo" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HNC-P8-PbV">
-                                        <rect key="frame" x="0.0" y="340.66666666666669" width="398" height="48"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="70"/>
-                                        <nil key="textColor"/>
-                                        <nil key="highlightedColor"/>
-                                        <variation key="heightClass=regular-widthClass=compact">
-                                            <fontDescription key="fontDescription" type="system" pointSize="40"/>
-                                        </variation>
-                                    </label>
-                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xzZ-jc-k2v">
-                                        <rect key="frame" x="0.0" y="388.66666666666674" width="398" height="322.33333333333326"/>
-                                        <subviews>
-                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="HFL-Ye-6HR">
-                                                <rect key="frame" x="103.33333333333333" y="112.33333333333331" width="191.66666666666669" height="97.666666666666686"/>
-                                                <subviews>
-                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clock" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r85-eB-vVd">
-                                                        <rect key="frame" x="0.0" y="0.0" width="191.66666666666666" height="77.666666666666671"/>
-                                                        <fontDescription key="fontDescription" type="system" pointSize="70"/>
-                                                        <nil key="textColor"/>
-                                                        <nil key="highlightedColor"/>
-                                                        <variation key="heightClass=regular-widthClass=compact">
-                                                            <fontDescription key="fontDescription" type="system" pointSize="65"/>
-                                                        </variation>
-                                                    </label>
-                                                    <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert Name" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tiA-fs-ZRV">
-                                                        <rect key="frame" x="0.0" y="87.666666666666629" width="191.66666666666666" height="0.0"/>
-                                                        <fontDescription key="fontDescription" type="system" pointSize="70"/>
-                                                        <nil key="textColor"/>
-                                                        <nil key="highlightedColor"/>
-                                                        <variation key="heightClass=regular-widthClass=compact">
-                                                            <fontDescription key="fontDescription" type="system" pointSize="40"/>
-                                                        </variation>
-                                                    </label>
-                                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Meu-VT-byv">
-                                                        <rect key="frame" x="0.0" y="87.666666666666629" width="191.66666666666666" height="0.0"/>
-                                                        <color key="backgroundColor" systemColor="labelColor"/>
-                                                        <fontDescription key="fontDescription" type="system" pointSize="70"/>
-                                                        <state key="normal" title="Snooze">
-                                                            <color key="titleColor" systemColor="systemBackgroundColor"/>
-                                                        </state>
-                                                        <variation key="heightClass=regular-widthClass=compact">
-                                                            <fontDescription key="fontDescription" type="system" pointSize="40"/>
-                                                        </variation>
-                                                        <connections>
-                                                            <action selector="SnoozeButton:" destination="e0E-cx-0Wr" eventType="touchUpInside" id="vNY-W3-rAn"/>
-                                                        </connections>
-                                                    </button>
-                                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dav-Y8-lSK">
-                                                        <rect key="frame" x="0.0" y="97.666666666666629" width="191.66666666666666" height="0.0"/>
-                                                        <subviews>
-                                                            <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="snoozeMinutes" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iC4-A1-q9b">
-                                                                <rect key="frame" x="0.0" y="0.0" width="0.0" height="32"/>
-                                                                <fontDescription key="fontDescription" type="system" pointSize="20"/>
-                                                                <nil key="textColor"/>
-                                                                <nil key="highlightedColor"/>
-                                                            </label>
-                                                            <stepper hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="1000" translatesAutoresizingMaskIntoConstraints="NO" id="0cS-P2-Zus">
-                                                                <rect key="frame" x="0.0" y="0.0" width="0.0" height="32"/>
-                                                                <connections>
-                                                                    <action selector="snoozeForMinuteValChanged:" destination="e0E-cx-0Wr" eventType="valueChanged" id="6x5-Fb-oad"/>
-                                                                </connections>
-                                                            </stepper>
-                                                        </subviews>
-                                                    </stackView>
-                                                </subviews>
-                                            </stackView>
-                                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="9ey-Az-e5u" userLabel="debugTextView">
-                                                <rect key="frame" x="8" y="8" width="382" height="306.33333333333331"/>
-                                                <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                                <textInputTraits key="textInputTraits" autocapitalizationType="sentences" autocorrectionType="no"/>
-                                            </textView>
-                                        </subviews>
-                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                                        <constraints>
-                                            <constraint firstItem="HFL-Ye-6HR" firstAttribute="centerY" secondItem="xzZ-jc-k2v" secondAttribute="centerY" id="7yv-SD-WC5"/>
-                                            <constraint firstItem="9ey-Az-e5u" firstAttribute="leading" secondItem="xzZ-jc-k2v" secondAttribute="leading" constant="8" id="8DB-3W-vzX"/>
-                                            <constraint firstItem="HFL-Ye-6HR" firstAttribute="centerX" secondItem="xzZ-jc-k2v" secondAttribute="centerX" id="9b8-g8-Qgc"/>
-                                            <constraint firstAttribute="trailing" secondItem="9ey-Az-e5u" secondAttribute="trailing" constant="8" id="MdV-jD-BcV"/>
-                                            <constraint firstAttribute="bottom" secondItem="9ey-Az-e5u" secondAttribute="bottom" constant="8" id="rD1-uF-92v"/>
-                                            <constraint firstItem="9ey-Az-e5u" firstAttribute="top" secondItem="xzZ-jc-k2v" secondAttribute="top" constant="8" id="w6s-Ek-CoQ"/>
-                                        </constraints>
-                                    </view>
-                                </subviews>
-                            </stackView>
-                        </subviews>
                         <viewLayoutGuide key="safeArea" id="Dt4-CR-Iqb"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-                        <constraints>
-                            <constraint firstItem="Dt4-CR-Iqb" firstAttribute="trailing" secondItem="ZaU-Ss-piB" secondAttribute="trailing" constant="8" id="IRK-1u-ILj"/>
-                            <constraint firstItem="ZaU-Ss-piB" firstAttribute="leading" secondItem="Dt4-CR-Iqb" secondAttribute="leading" constant="8" id="Rbf-PP-eex"/>
-                            <constraint firstItem="Dt4-CR-Iqb" firstAttribute="bottom" secondItem="ZaU-Ss-piB" secondAttribute="bottom" constant="8" id="WgA-wX-qtd"/>
-                            <constraint firstItem="Dt4-CR-Iqb" firstAttribute="bottom" secondItem="xzZ-jc-k2v" secondAttribute="bottom" constant="8" id="bY3-br-SWl"/>
-                            <constraint firstItem="ZaU-Ss-piB" firstAttribute="top" secondItem="Dt4-CR-Iqb" secondAttribute="top" constant="50" id="cD1-U9-tJJ"/>
-                        </constraints>
                     </view>
                     <tabBarItem key="tabBarItem" title="Snoozer" image="zzz" catalog="system" id="TdI-rW-rdW"/>
-                    <connections>
-                        <outlet property="AlertLabel" destination="tiA-fs-ZRV" id="bGa-wR-GbX"/>
-                        <outlet property="BGLabel" destination="Iq3-I1-HX0" id="nkC-0M-OpG"/>
-                        <outlet property="DeltaLabel" destination="YCF-22-z3g" id="bmQ-Wc-E3S"/>
-                        <outlet property="DirectionLabel" destination="hLM-Es-BOa" id="Q2e-By-G1t"/>
-                        <outlet property="MinAgoLabel" destination="HNC-P8-PbV" id="gLP-TD-hOq"/>
-                        <outlet property="SnoozeButton" destination="Meu-VT-byv" id="Xnm-tj-t53"/>
-                        <outlet property="clockLabel" destination="r85-eB-vVd" id="JTa-Uu-hdN"/>
-                        <outlet property="debugTextView" destination="9ey-Az-e5u" id="ycy-T9-ioF"/>
-                        <outlet property="snoozeForMinuteLabel" destination="iC4-A1-q9b" id="Jvg-g0-bjs"/>
-                        <outlet property="snoozeForMinuteStepper" destination="0cS-P2-Zus" id="ren-xl-jxN"/>
-                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="5xM-cL-5VG" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
             </objects>
@@ -473,13 +337,13 @@
         <!--Nightscout-->
         <scene sceneID="wg7-f3-ORb">
             <objects>
-                <viewController id="8rJ-Kc-sve" customClass="NightscoutViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController id="8rJ-Kc-sve" customClass="NightscoutViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Xw-bG-4Kg">
-                                <rect key="frame" x="0.0" y="44" width="414" height="769"/>
+                                <rect key="frame" x="0.0" y="88" width="414" height="691"/>
                                 <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <wkWebViewConfiguration key="configuration">
                                     <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
@@ -508,7 +372,7 @@
         <!--Remote-->
         <scene sceneID="sEH-4N-YEn">
             <objects>
-                <viewController storyboardIdentifier="RemoteViewController" id="7an-Fz-r9u" customClass="RemoteViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="RemoteViewController" id="7an-Fz-r9u" customClass="RemoteViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="53u-XU-GCk">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -525,7 +389,7 @@
         <!--Alarm View Controller-->
         <scene sceneID="a12-B3-C4d">
             <objects>
-                <viewController storyboardIdentifier="AlarmViewController" id="b34-C5-D6e" customClass="AlarmViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="AlarmViewController" id="b34-C5-D6e" customClass="AlarmViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="c56-D7-E8f">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -541,7 +405,7 @@
         <!--Settings-->
         <scene sceneID="ORV-wr-Fd3">
             <objects>
-                <viewController id="hDv-qK-Udb" customClass="SettingsViewController" customModule="Loop_Follow" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController id="hDv-qK-Udb" customClass="SettingsViewController" customModule="LoopFollow" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="ljg-dW-5uR">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -582,11 +446,8 @@
         <image name="house" catalog="system" width="128" height="104"/>
         <image name="safari" catalog="system" width="128" height="123"/>
         <image name="zzz" catalog="system" width="119" height="128"/>
-        <systemColor name="labelColor">
-            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-        </systemColor>
         <systemColor name="secondarySystemBackgroundColor">
-            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+            <color red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 2 - 0
LoopFollow/Application/SceneDelegate.swift

@@ -44,9 +44,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
             if let vc = viewControllers[i] as? AlarmViewController {
                vc.appStateController = appStateController
             }
+             /* TODO
             if let vc = viewControllers[i] as? SnoozeViewController {
                vc.appStateController = appStateController
             }
+              */
             if let vc = viewControllers[i] as? debugViewController {
                vc.appStateController = appStateController
             }

+ 3 - 3
LoopFollow/Controllers/Alarms.swift

@@ -672,7 +672,7 @@ extension MainViewController {
         if !UserDefaultsRepository.alertAudioDuringPhone.value && isOnPhoneCall() { audioDuringCall = false }
         
         guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: latestDirectionString ?? "", deltaVal: latestDeltaString, minAgoVal: latestMinAgoString ?? "", alertLabelVal: AlarmSound.whichAlarm)
+        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: Observable.shared.directionText.value, deltaVal: latestDeltaString, minAgoVal: Observable.shared.minAgoText.value, alertLabelVal: AlarmSound.whichAlarm)
         if audio && !UserDefaultsRepository.alertMuteAllIsMuted.value && audioDuringCall{
             AlarmSound.setSoundFile(str: sound)
             AlarmSound.play(overrideVolume: overrideVolume, numLoops: numLoops)
@@ -688,7 +688,7 @@ extension MainViewController {
         if !UserDefaultsRepository.alertAudioDuringPhone.value && isOnPhoneCall() { audioDuringCall = false }
         
         guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: latestDirectionString ?? "", deltaVal: latestDeltaString, minAgoVal: latestMinAgoString ?? "", alertLabelVal: AlarmSound.whichAlarm)
+        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: Observable.shared.directionText.value, deltaVal: latestDeltaString, minAgoVal: Observable.shared.minAgoText.value, alertLabelVal: AlarmSound.whichAlarm)
         snoozer.SnoozeButton.isHidden = false
         snoozer.AlertLabel.isHidden = false
         snoozer.clockLabel.isHidden = true
@@ -721,7 +721,7 @@ extension MainViewController {
         
         AlarmSound.whichAlarm = "none"
         guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: latestDirectionString ?? "", deltaVal: latestDeltaString, minAgoVal: latestMinAgoString ?? "", alertLabelVal: AlarmSound.whichAlarm)
+        snoozer.updateDisplayWhenTriggered(bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: Observable.shared.directionText.value, deltaVal: latestDeltaString, minAgoVal: Observable.shared.minAgoText.value, alertLabelVal: AlarmSound.whichAlarm)
         snoozer.SnoozeButton.isHidden = true
         snoozer.AlertLabel.isHidden = true
         if AlarmSound.isPlaying {

+ 15 - 13
LoopFollow/Controllers/Nightscout/BGData.swift

@@ -240,24 +240,19 @@ extension MainViewController {
             let deltaTime = (TimeInterval(Date().timeIntervalSince1970) - lastBGTime) / 60
             self.updateServerText(with: sourceName)
 
-            var snoozerBG = ""
-            var snoozerDirection = ""
             var snoozerDelta = ""
 
             // Set BGText with the latest BG value
-            self.BGText.text = Localizer.toDisplayUnits(String(latestBG))
-            snoozerBG = Localizer.toDisplayUnits(String(latestBG))
             self.setBGTextColor()
 
+            Observable.shared.bgText.value = Localizer
+                .toDisplayUnits(String(latestBG))
+
             // Direction handling
             if let directionBG = entries[latestEntryIndex].direction {
-                self.DirectionText.text = self.bgDirectionGraphic(directionBG)
-                snoozerDirection = self.bgDirectionGraphic(directionBG)
-                self.latestDirectionString = self.bgDirectionGraphic(directionBG)
+                Observable.shared.directionText.value = self.bgDirectionGraphic(directionBG)
             } else {
-                self.DirectionText.text = ""
-                snoozerDirection = ""
-                self.latestDirectionString = ""
+                Observable.shared.directionText.value = ""
             }
 
             // Delta handling
@@ -284,14 +279,21 @@ extension MainViewController {
             self.BGText.attributedText = attributeString
 
             // Snoozer Display
+            /*
+             TODO
             guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-            snoozer.BGLabel.text = snoozerBG
             snoozer.DirectionLabel.text = snoozerDirection
             snoozer.DeltaLabel.text = snoozerDelta
-
+*/
             // Update contact
             if Storage.shared.contactEnabled.value {
-                self.contactImageUpdater.updateContactImage(bgValue: bgTextStr, trend: snoozerDirection, delta: snoozerDelta, stale: deltaTime >= 12)
+                self.contactImageUpdater
+                    .updateContactImage(
+                        bgValue: bgTextStr,
+                        trend: Observable.shared.directionText.value,
+                        delta: snoozerDelta,
+                        stale: deltaTime >= 12
+                    )
             }
         }
     }

+ 8 - 12
LoopFollow/Info.plist

@@ -2,8 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>NSHumanReadableCopyright</key>
-	<string></string>
 	<key>AppGroupIdentifier</key>
 	<string>group.com.$(unique_id).LoopFollow$(app_suffix)</string>
 	<key>BGTaskSchedulerPermittedIdentifiers</key>
@@ -47,6 +45,8 @@
 	<string>13.0</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
+	<key>LSSupportsOpeningDocumentsInPlace</key>
+	<true/>
 	<key>NSBluetoothAlwaysUsageDescription</key>
 	<string>This app uses Bluetooth to connect to devices for managing background operations.</string>
 	<key>NSCalendarsFullAccessUsageDescription</key>
@@ -57,6 +57,8 @@
 	<string>This app requires access to contacts to update a contact image with real-time blood glucose information.</string>
 	<key>NSFaceIDUsageDescription</key>
 	<string>This app requires Face ID for secure authentication.</string>
+	<key>NSHumanReadableCopyright</key>
+	<string></string>
 	<key>UIApplicationSceneManifest</key>
 	<dict>
 		<key>UIApplicationSupportsMultipleScenes</key>
@@ -82,6 +84,8 @@
 		<string>processing</string>
 		<string>bluetooth-central</string>
 	</array>
+	<key>UIFileSharingEnabled</key>
+	<true/>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
 	<key>UIMainStoryboardFile</key>
@@ -102,18 +106,10 @@
 	</dict>
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
-    <key>UIFileSharingEnabled</key>
-    <true/>
-    <key>LSSupportsOpeningDocumentsInPlace</key>
-    <true/>
 </dict>
 </plist>

+ 74 - 38
LoopFollow/Snoozer/SnoozerView.swift

@@ -6,61 +6,97 @@
 //  Copyright © 2025 Jon Fawcett. All rights reserved.
 //
 
-
 import SwiftUI
 
 struct SnoozerView: View {
-    @ObservedObject var bgValue: ObservableValue<String>
-    @ObservedObject var deltaValue: ObservableValue<String>
-    @ObservedObject var direction: ObservableValue<String>
-    @ObservedObject var age: ObservableValue<String>
-    @ObservedObject var time: ObservableValue<String>
-    @ObservedObject var alarmText: ObservableValue<String?>
+    @ObservedObject var minAgoText = Observable.shared.minAgoText
+    @ObservedObject var bgText = Observable.shared.bgText
+    @ObservedObject var bgTextcolor = Observable.shared.bgTextColor
+    @ObservedObject var directionText = Observable.shared.directionText
 
     @Binding var snoozeMinutes: Int
     var onSnooze: () -> Void
 
     var body: some View {
-        VStack(spacing: 12) {
-            Text(bgValue.value)
-                .font(.system(size: 72, weight: .bold))
-                .foregroundColor(.yellow)
+        ZStack {
+            Color.black
+                .edgesIgnoringSafeArea(.all)
 
-            if let alarm = alarmText.value, !alarm.isEmpty {
-                Text(alarm)
-                    .font(.title2)
-                    .foregroundColor(.red)
-            }
+            VStack(spacing: 0) {
+                // MARK: Main numbers block
+                VStack(spacing: 0) {
+                    Text(bgText.value)
+                        .font(.system(size: 220, weight: .black))
+                        .minimumScaleFactor(0.5)
+                        .foregroundColor(Observable.shared.bgTextColor.value)
+                        .frame(maxWidth: .infinity, maxHeight: 167)
 
-            Text(direction.value)
-                .font(.title)
+                    Text(directionText.value)
+                        .font(.system(size: 110, weight: .black))
+                        .minimumScaleFactor(0.5)
+                        .foregroundColor(.white)
+                        .frame(maxWidth: .infinity, maxHeight: 96)
 
-            Text(deltaValue.value)
-                .font(.title2)
-                .foregroundColor(.white.opacity(0.8))
+                    Text(""/*deltaValue.value*/)
+                        .font(.system(size: 70))
+                        .minimumScaleFactor(0.5)
+                        .foregroundColor(.white.opacity(0.8))
+                        .frame(maxWidth: .infinity, maxHeight: 78)
 
-            Text(age.value + " ago")
-                .font(.subheadline)
-                .foregroundColor(.white.opacity(0.6))
+                    Text(minAgoText.value)
+                        .font(.system(size: 70))
+                        .minimumScaleFactor(0.5)
+                        .foregroundColor(.white.opacity(0.6))
+                        .frame(maxWidth: .infinity, maxHeight: 48)
+                }
 
-            Text(time.value)
-                .font(.title3)
+                // MARK: Clock + optional alert label
+                VStack(spacing: 8) {
+                    Text("19:59"/*time.value*/)
+                        .font(.system(size: 70))
+                        .minimumScaleFactor(0.5)
+                        .foregroundColor(.white)
+                        .frame(height: 78)
+/*
+                    if let alarm = ""/*alarmText.value*/, !alarm.isEmpty {
+                        Text(alarm)
+                            .font(.system(size: 40, weight: .semibold))
+                            .foregroundColor(.red)
+                            .minimumScaleFactor(0.5)
+                            .lineLimit(1)
+                            .frame(height: 48)
+                    }*/
+                }
+                .padding(.vertical, 16)
 
-            HStack {
-                Text("Snooze for \(snoozeMinutes) min")
-                Stepper("", value: $snoozeMinutes, in: 1...60)
-                    .labelsHidden()
-            }
-            .padding(.top)
+                Spacer()
 
-            Button("Snooze", action: onSnooze)
-                .padding()
-                .background(Color.blue)
+                // MARK: Snooze controls
+                HStack(spacing: 12) {
+                    Text("Snooze for")
+                        .font(.system(size: 20))
+                        .foregroundColor(.white)
+                    Text("\(snoozeMinutes) min")
+                        .font(.system(size: 20, weight: .semibold))
+                        .foregroundColor(.white)
+                    Spacer()
+                    Stepper("", value: $snoozeMinutes, in: 1...60)
+                        .labelsHidden()
+                }
+                .padding(.horizontal, 32)
+                .frame(height: 44)
+
+                Button(action: onSnooze) {
+                    Text("Snooze")
+                        .font(.system(size: 24, weight: .bold))
+                        .frame(maxWidth: .infinity, minHeight: 56)
+                }
+                .background(Color(white: 0.15))
                 .foregroundColor(.white)
                 .cornerRadius(8)
+                .padding(.horizontal, 32)
+                .padding(.bottom, 32)
+            }
         }
-        .padding()
-        .background(Color.black)
-        .edgesIgnoringSafeArea(.all)
     }
 }

+ 2 - 24
LoopFollow/Snoozer/SnoozerViewController.swift

@@ -14,30 +14,17 @@ import Combine
 class SnoozerViewController: UIViewController {
     private var hostingController: UIHostingController<SnoozerView>?
 
-    private var bgValue = ObservableValue<String>(default: "8,9")
-    private var deltaValue = ObservableValue<String>(default: "-0,7")
-    private var direction = ObservableValue<String>(default: "→")
-    private var age = ObservableValue<String>(default: "4 min")
-    private var time = ObservableValue<String>(default: "10:28")
-    private var alarmText = ObservableValue<String?>(default: "High Alert")
     @State private var snoozeMinutes = 15
 
     override func viewDidLoad() {
         super.viewDidLoad()
         view.backgroundColor = .black
 
-        let snoozerView = SnoozerView(
-            bgValue: bgValue,
-            deltaValue: deltaValue,
-            direction: direction,
-            age: age,
-            time: time,
-            alarmText: alarmText,
-            snoozeMinutes: Binding(get: { self.snoozeMinutes }, set: { self.snoozeMinutes = $0 }),
+        let snoozerView = SnoozerView(snoozeMinutes: $snoozeMinutes,
             onSnooze: {
                 // Trigger snooze logic here (e.g., update UserDefaultsRepository, stop alarm, etc.)
                 print("Snoozed for \(self.snoozeMinutes) minutes")
-            }
+            },
         )
 
         let hosting = UIHostingController(rootView: snoozerView)
@@ -55,13 +42,4 @@ class SnoozerViewController: UIViewController {
 
         hosting.didMove(toParent: self)
     }
-
-    // ✅ Only this screen supports landscape
-    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
-        return [.portrait, .landscapeLeft, .landscapeRight]
-    }
-
-    override var shouldAutorotate: Bool {
-        return true
-    }
 }

+ 11 - 4
LoopFollow/Storage/Observable.swift

@@ -8,6 +8,7 @@
 
 import Foundation
 import HealthKit
+import SwiftUI
 
 class Observable {
     static let shared = Observable()
@@ -16,11 +17,17 @@ class Observable {
     var override = ObservableValue<String?>(default: nil)
     var lastRecBolusTriggered = ObservableValue<Double?>(default: nil)
 
-    // Work in progress here.. 
-    var bgValue = ObservableValue<Double>(default: 0.0)
+    var minAgoText = ObservableValue<String>(default: "?? min ago")
+    var bgText = ObservableValue<String>(default: "BG")
+    //TODO
+    var bgTextStale = ObservableValue<Bool>(default: true)
+    var bgTextColor = ObservableValue<Color>(default: .yellow)
+    var directionText = ObservableValue<String>(default: "-")
+    var deltaText = ObservableValue<String>(default: "+0")
+
+
+    // Work in progress here..
     var trendArrow = ObservableValue<String>(default: "→")
-    var delta = ObservableValue<Double>(default: 0.0)
-    var minutesAgo = ObservableValue<Int>(default: 0)
     var alarmTitle = ObservableValue<String?>(default: nil)
 
     private init() {}

+ 8 - 7
LoopFollow/Task/MinAgoTask.swift

@@ -23,12 +23,13 @@ extension MainViewController {
             DispatchQueue.main.async { [weak self] in
                 guard let self = self else { return }
                 self.MinAgoText.text = ""
-                self.latestMinAgoString = ""
+                Observable.shared.minAgoText.value = ""
+                Observable.shared.bgText.value = ""
+                /*TODO
                 if let snoozer = self.tabBarController?.viewControllers?[2] as? SnoozeViewController {
-                    snoozer.MinAgoLabel.text = ""
-                    snoozer.BGLabel.text = ""
                     snoozer.BGLabel.attributedText = NSAttributedString(string: "")
                 }
+                 */
             }
             TaskScheduler.shared.rescheduleTask(id: .minAgoUpdate, to: Date().addingTimeInterval(1))
             return
@@ -54,15 +55,14 @@ extension MainViewController {
         let minAgoDisplayText = formattedDuration + " min ago"
 
         // Update UI only if the display text has changed
-        if minAgoDisplayText != latestMinAgoString {
+        if minAgoDisplayText != Observable.shared.minAgoText.value {
             DispatchQueue.main.async { [weak self] in
                 guard let self = self else { return }
                 self.MinAgoText.text = minAgoDisplayText
-                self.latestMinAgoString = minAgoDisplayText
+                Observable.shared.minAgoText.value = minAgoDisplayText
 
+                /*TODO
                 if let snoozer = self.tabBarController?.viewControllers?[2] as? SnoozeViewController {
-                    snoozer.MinAgoLabel.text = minAgoDisplayText
-
                     let bgLabelText = snoozer.BGLabel.text ?? ""
                     let attributeString = NSMutableAttributedString(string: bgLabelText)
                     attributeString.addAttribute(.strikethroughStyle,
@@ -73,6 +73,7 @@ extension MainViewController {
                                                  range: NSRange(location: 0, length: attributeString.length))
                     snoozer.BGLabel.attributedText = attributeString
                 }
+                 */
             }
         }
 

+ 29 - 10
LoopFollow/ViewControllers/MainViewController.swift

@@ -13,6 +13,8 @@ import ShareClient
 import UserNotifications
 import AVFAudio
 import CoreBluetooth
+import Combine
+import SwiftUI
 
 func IsNightscoutEnabled() -> Bool {
     return !ObservableUserDefaults.shared.url.value.isEmpty
@@ -105,8 +107,6 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
     var deviceBatteryData: [DataStructs.batteryStruct] = []
     var newBGPulled = false
     var lastCalDate: Double = 0
-    var latestDirectionString = ""
-    var latestMinAgoString = ""
     var latestDeltaString = ""
     var latestLoopStatusString = ""
     var latestCOB: CarbMetric?
@@ -144,6 +144,8 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
 
     let contactImageUpdater = ContactImageUpdater()
 
+    private var cancellables = Set<AnyCancellable>()
+
     override func viewDidLoad() {
         super.viewDidLoad()
 
@@ -194,8 +196,9 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         }
 
         // Load the snoozer tab
-        guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-        snoozer.loadViewIfNeeded()
+        //TODO:
+        //guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
+        //snoozer.loadViewIfNeeded()
 
         // Trigger foreground and background functions
         let notificationCenter = NotificationCenter.default
@@ -235,8 +238,23 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         
         refreshScrollView.delegate = self
         NotificationCenter.default.addObserver(self, selector: #selector(refresh), name: NSNotification.Name("refresh"), object: nil)
+
+        Observable.shared.bgText.$value
+            .receive(on: DispatchQueue.main)
+            .sink { [weak self] newValue in
+                self?.BGText.text = newValue
+            }
+            .store(in: &cancellables)
+
+        Observable.shared.directionText
+            .$value
+            .receive(on: DispatchQueue.main)
+            .sink { [weak self] newValue in
+                self?.DirectionText.text = newValue
+            }
+            .store(in: &cancellables)
     }
-    
+
     deinit {
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name("refresh"), object: nil)
     }
@@ -269,7 +287,7 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         }
 
         MinAgoText.text = "Refreshing"
-        latestMinAgoString = "Refreshing"
+        Observable.shared.minAgoText.value = "Refreshing"
         scheduleAllTasks()
 
         currentCage = nil
@@ -520,27 +538,27 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
 
     func setBGTextColor() {
         if bgData.count > 0 {
-            guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
             let latestBG = bgData[bgData.count - 1].sgv
             var color: NSUIColor = NSUIColor.label
             if UserDefaultsRepository.colorBGText.value {
                 if Float(latestBG) >= UserDefaultsRepository.highLine.value {
                     color = NSUIColor.systemYellow
+                    Observable.shared.bgTextColor.value = .yellow
                 } else if Float(latestBG) <= UserDefaultsRepository.lowLine.value {
                     color = NSUIColor.systemRed
+                    Observable.shared.bgTextColor.value = .red
                 } else {
                     color = NSUIColor.systemGreen
+                    Observable.shared.bgTextColor.value = .green
                 }
             }
             
             BGText.textColor = color
-            snoozer.BGLabel.textColor = color
         }
     }
     
     func bgDirectionGraphic(_ value:String)->String
     {
-        if value == nil { return "-" }
         let //graphics:[String:String]=["Flat":"\u{2192}","DoubleUp":"\u{21C8}","SingleUp":"\u{2191}","FortyFiveUp":"\u{2197}\u{FE0E}","FortyFiveDown":"\u{2198}\u{FE0E}","SingleDown":"\u{2193}","DoubleDown":"\u{21CA}","None":"-","NOT COMPUTABLE":"-","RATE OUT OF RANGE":"-"]
     graphics:[String:String]=["Flat":"→","DoubleUp":"↑↑","SingleUp":"↑","FortyFiveUp":"↗","FortyFiveDown":"↘︎","SingleDown":"↓","DoubleDown":"↓↓","None":"-","NONE":"-","NOT COMPUTABLE":"-","RATE OUT OF RANGE":"-", "": "-"]
         return graphics[value]!
@@ -658,8 +676,9 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
     func persistentNotification(bgTime: TimeInterval)
     {
         if UserDefaultsRepository.persistentNotification.value && bgTime > UserDefaultsRepository.persistentNotificationLastBGTime.value && bgData.count > 0 {
+/*TODO
             guard let snoozer = self.tabBarController!.viewControllers?[2] as? SnoozeViewController else { return }
-            snoozer.sendNotification(self, bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: latestDirectionString, deltaVal: latestDeltaString, minAgoVal: latestMinAgoString, alertLabelVal: "Latest BG")
+            snoozer.sendNotification(self, bgVal: Localizer.toDisplayUnits(String(bgData[bgData.count - 1].sgv)), directionVal: Observable.shared.directionText.value, deltaVal: latestDeltaString, minAgoVal: Observable.shared.minAgoText.value, alertLabelVal: "Latest BG")*/
         }
     }
 

+ 1 - 1
LoopFollow/ViewControllers/SnoozeViewController.swift

@@ -9,7 +9,7 @@
 import UIKit
 import UserNotifications
 
-
+//TODO
 class SnoozeViewController: UIViewController, UNUserNotificationCenterDelegate {
     var appStateController: AppStateController?
     var snoozeTabItem: UITabBarItem = UITabBarItem()