Skip to content

Commit 8355851

Browse files
authored
Remove profile card on iPhone SE 1st Gen with keyboard enabled (#781)
1 parent 41e2fd5 commit 8355851

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/GravatarUI/SwiftUI/ProfileEditor/QuickEditor.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,16 @@ struct QuickEditor<ImageEditor: ImageEditorView>: View {
226226
}
227227
}
228228

229+
var shouldHideProfileCardHeader: Bool {
230+
let screenHeight = UIScreen.main.bounds.height
231+
let iPhoneSE3rdGenScreenHeight: CGFloat = 667
232+
233+
return (vertcalSizeClass == .compact || screenHeight <= iPhoneSE3rdGenScreenHeight) && model.isKeyboardPresented
234+
}
235+
229236
@ViewBuilder
230237
func profileCardHeaderView() -> some View {
231-
if !(vertcalSizeClass == .compact && model.isKeyboardPresented) {
238+
if !shouldHideProfileCardHeader {
232239
EmailText(email: model.email)
233240
.accumulateIntrinsicHeight()
234241
profileView()

0 commit comments

Comments
 (0)