소스 검색

refactoring

polscm32 2 년 전
부모
커밋
87c4fde5ca
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 6 - 2
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -807,8 +807,8 @@ extension Home {
                         .ignoresSafeArea(edges: .all)
                 }
         }
-
-        var body: some View {
+        
+        @ViewBuilder func mainView() -> some View {
             GeometryReader { geo in
                 ZStack(alignment: .trailing) {
                     VStack(spacing: 0) {
@@ -912,6 +912,10 @@ extension Home {
             }
         }
 
+        var body: some View {
+            mainView()
+        }
+
         private var popup: some View {
             VStack(alignment: .leading, spacing: 4) {
                 Text(state.statusTitle).font(.headline).foregroundColor(.white)