Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ struct NoTreatmentFilterView: View {

}
Spacer()
.frame(height: 198.adjustedH)
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
)
Comment on lines +53 to +56
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

scrollViewHeight 이중 스케일링으로 여백이 과해질 수 있습니다.

Line 53-56에서 scrollViewHeight 계산에 이미 adjustedH가 포함되어 있는데 다시 .adjustedH를 적용해 크기가 과장될 가능성이 있습니다. 동일하게 한 번만 적용해주세요.

🛠️ 수정 제안
-                        .frame(
-                            height: viewModel.selectedTreatments.isEmpty ?
-                            24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
-                        )
+                        .frame(
+                            height: viewModel.selectedTreatments.isEmpty ?
+                            24.adjustedH : scrollViewHeight + 24.adjustedH
+                        )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
)
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight + 24.adjustedH
)
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/NoTreatment/NoTreatmentFilterView.swift`
around lines 53 - 56, The frame height calculation applies the adjustedH scale
twice to scrollViewHeight causing excessive spacing; update the height
expression in the .frame call that uses viewModel.selectedTreatments and
scrollViewHeight so that scrollViewHeight is only scaled once (remove the extra
.adjustedH) and keep adjustedH applied to either scrollViewHeight or the added
constant (24) consistently to avoid double-scaling.

}
}


}
.task {
await viewModel.fetchNoTreatments()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ struct TreatmentFilterView: View {
.padding(.horizontal, 24.adjustedW)
}
Spacer()
.frame(height: 198.adjustedH)
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
)
Comment on lines +78 to +81
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

scrollViewHeight.adjustedH가 중복 적용됩니다.

Line 78-81에서 scrollViewHeight는 이미 adjustedH를 포함해 계산되므로 다시 .adjustedH를 적용하면 기기별로 간격이 과도하게 늘어날 수 있습니다. scrollViewHeight는 그대로 사용하세요.

🛠️ 수정 제안
-                        .frame(
-                            height: viewModel.selectedTreatments.isEmpty ?
-                            24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
-                        )
+                        .frame(
+                            height: viewModel.selectedTreatments.isEmpty ?
+                            24.adjustedH : scrollViewHeight + 24.adjustedH
+                        )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
)
.frame(
height: viewModel.selectedTreatments.isEmpty ?
24.adjustedH : scrollViewHeight + 24.adjustedH
)
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift`
around lines 78 - 81, The frame height applies .adjustedH twice to
scrollViewHeight; in the TreatmentFilterView replace the double-adjustment by
using scrollViewHeight directly (leave .adjustedH only on the empty case).
Update the .frame(height:) expression that references
viewModel.selectedTreatments and scrollViewHeight so it uses scrollViewHeight
(no .adjustedH) when not empty, keeping the existing 24.adjustedH on the empty
branch.

}
}

Expand Down