Ivan Valkou 4 лет назад
Родитель
Сommit
006a2acf0b

+ 4 - 1
FreeAPS/Resources/Info.plist

@@ -63,7 +63,7 @@
 	<key>UIApplicationSceneManifest</key>
 	<dict>
 		<key>UIApplicationSupportsMultipleScenes</key>
-		<true/>
+		<false/>
 	</dict>
 	<key>UIApplicationSupportsIndirectInputEvents</key>
 	<true/>
@@ -80,9 +80,12 @@
 	<array>
 		<string>armv7</string>
 	</array>
+	<key>UIRequiresFullScreen</key>
+	<false/>
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>

+ 15 - 0
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -93,6 +93,9 @@ struct MainChartView: View {
         return formatter
     }
 
+    @Environment(\.horizontalSizeClass) var hSizeClass
+    @Environment(\.verticalSizeClass) var vSizeClass
+
     // MARK: - Views
 
     var body: some View {
@@ -102,6 +105,18 @@ struct MainChartView: View {
                 mainScrollView(fullSize: geo.size)
                 glucoseLabelsView(fullSize: geo.size)
             }
+            .onChange(of: hSizeClass) { _ in
+                update(fullSize: geo.size)
+            }
+            .onChange(of: vSizeClass) { _ in
+                update(fullSize: geo.size)
+            }
+            .onReceive(
+                Foundation.NotificationCenter.default
+                    .publisher(for: UIDevice.orientationDidChangeNotification)
+            ) { _ in
+                update(fullSize: geo.size)
+            }
         }
     }
 

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -73,7 +73,7 @@ extension Home {
                         state.setupPump = true
                     }
                 }
-                .popover(isPresented: $state.setupPump) {
+                .sheet(isPresented: $state.setupPump) {
                     if let pumpManager = state.provider.apsManager.pumpManager {
                         PumpConfig.PumpSettingsView(pumpManager: pumpManager, completionDelegate: state)
                     }

+ 1 - 1
FreeAPS/Sources/Modules/PumpConfig/View/PumpConfigRootView.swift

@@ -28,7 +28,7 @@ extension PumpConfig {
             .onAppear(perform: configureView)
             .navigationTitle("Pump config")
             .navigationBarTitleDisplayMode(.automatic)
-            .popover(isPresented: $state.setupPump) {
+            .sheet(isPresented: $state.setupPump) {
                 if let pumpManager = state.provider.apsManager.pumpManager {
                     PumpSettingsView(pumpManager: pumpManager, completionDelegate: state)
                 } else {