Просмотр исходного кода

Fix active bolus view being obscured and isSuspended race condition

Remove .ignoresSafeArea(.keyboard) from HomeRootView which could
intermittently cause the bottom content (active bolus/adjustment
views) to be laid out outside the visible area due to SwiftUI safe
area inset miscalculation.

Also, fixed a race condition in APSManager so that isSuspended is
always accessed from the main dispatch queue (it's accessed by the
UI).
Sam King 1 месяц назад
Родитель
Сommit
4ef32aaabf
2 измененных файлов с 1 добавлено и 2 удалено
  1. 1 1
      Trio/Sources/APS/APSManager.swift
  2. 0 1
      Trio/Sources/Modules/Home/View/HomeRootView.swift

+ 1 - 1
Trio/Sources/APS/APSManager.swift

@@ -197,7 +197,7 @@ final class BaseAPSManager: APSManager, Injectable {
             .store(in: &lifetime)
             .store(in: &lifetime)
 
 
         deviceDataManager.suspended
         deviceDataManager.suspended
-            .receive(on: processQueue)
+            .receive(on: DispatchQueue.main)
             .sink { suspended in
             .sink { suspended in
                 self.isSuspended = suspended
                 self.isSuspended = suspended
             }
             }

+ 0 - 1
Trio/Sources/Modules/Home/View/HomeRootView.swift

@@ -1003,7 +1003,6 @@ extension Home {
             }
             }
             .navigationTitle("Home")
             .navigationTitle("Home")
             .navigationBarHidden(true)
             .navigationBarHidden(true)
-            .ignoresSafeArea(.keyboard)
             .blur(radius: state.isLoopStatusPresented ? 3 : 0)
             .blur(radius: state.isLoopStatusPresented ? 3 : 0)
             .sheet(isPresented: $state.isLoopStatusPresented) {
             .sheet(isPresented: $state.isLoopStatusPresented) {
                 LoopStatusView(state: state)
                 LoopStatusView(state: state)