diff --git a/Flipcash/Core/Screens/Profile/ChatMuteRow.swift b/Flipcash/Core/Screens/Profile/ChatMuteRow.swift index d24cecc3b..4aabaa791 100644 --- a/Flipcash/Core/Screens/Profile/ChatMuteRow.swift +++ b/Flipcash/Core/Screens/Profile/ChatMuteRow.swift @@ -22,36 +22,20 @@ import FlipcashUI /// grew was the muted one. struct ChatMuteRow: View { - /// How the trailing chevron draws. The two hosts style it differently and each is right on its - /// own screen, so the caller says which rather than one of them taking the other's look. - enum Chevron { - /// ``Row``'s own accessory chevron, matching the chat profile's other rows. - case standard - /// The smaller secondary chevron the user profile uses to match its profile card. - case secondary - } - let conversationID: ConversationID let insets: EdgeInsets - var chevron: Chevron = .standard @State private var isPickingDuration = false var body: some View { - Row(insets: insets, accessory: chevron == .standard ? .chevron : nil) { + // No chevron: this row opens a sheet rather than pushing a screen. The spacer is the one + // the accessory would have brought, holding the label against the leading edge. + Row(insets: insets) { Image(systemName: "bell.slash") .frame(minWidth: 45) Text("Mute Notifications") .foregroundStyle(.textMain) - - if chevron == .secondary { - // Nothing has claimed the slack, so the chevron needs the spacer the accessory - // would have brought. - Spacer() - Image(systemName: "chevron.right") - .font(.caption2) - .foregroundStyle(.textSecondary) - } + Spacer() } action: { isPickingDuration = true } diff --git a/Flipcash/Core/Screens/Profile/ChatProfileScreen.swift b/Flipcash/Core/Screens/Profile/ChatProfileScreen.swift index 4c3623a8d..1f8b54bf8 100644 --- a/Flipcash/Core/Screens/Profile/ChatProfileScreen.swift +++ b/Flipcash/Core/Screens/Profile/ChatProfileScreen.swift @@ -90,11 +90,12 @@ struct ChatProfileScreen: View { VStack(spacing: 0) { if isMember { - Row(insets: rowInsets, accessory: .chevron) { + Row(insets: rowInsets) { Image(systemName: "person.badge.plus") .frame(minWidth: 45) Text("Invite People To Join") .foregroundStyle(.textMain) + Spacer() } action: { isInviting = true } @@ -113,12 +114,16 @@ struct ChatProfileScreen: View { Row( insets: rowInsets, disabled: isLeaving, - accessory: isLeaving ? .loader(.textMain) : .chevron + accessory: isLeaving ? .loader(.textMain) : nil ) { Image(systemName: "rectangle.portrait.and.arrow.right") .frame(minWidth: 45) Text("Leave Group") .foregroundStyle(.textMain) + // Only while idle: the loader accessory brings its own spacer. + if !isLeaving { + Spacer() + } } action: { dialogItem = leaveDialog() } diff --git a/Flipcash/Core/Screens/Profile/ReportRow.swift b/Flipcash/Core/Screens/Profile/ReportRow.swift index c49c26527..9f301d77f 100644 --- a/Flipcash/Core/Screens/Profile/ReportRow.swift +++ b/Flipcash/Core/Screens/Profile/ReportRow.swift @@ -20,25 +20,17 @@ struct ReportRow: View { let target: ReportTarget let insets: EdgeInsets - var chevron: ChatMuteRow.Chevron = .standard @State private var isReporting = false var body: some View { - Row(insets: insets, accessory: chevron == .standard ? .chevron : nil) { + // No chevron: this row opens the reason flow as a cover rather than pushing a screen. + Row(insets: insets) { Image(systemName: "flag") .frame(minWidth: 45) Text("Report") .foregroundStyle(.textMain) - - if chevron == .secondary { - // Nothing has claimed the slack, so the chevron needs the spacer the accessory - // would have brought. - Spacer() - Image(systemName: "chevron.right") - .font(.caption2) - .foregroundStyle(.textSecondary) - } + Spacer() } action: { isReporting = true } diff --git a/Flipcash/Core/Screens/Profile/UserProfileScreen.swift b/Flipcash/Core/Screens/Profile/UserProfileScreen.swift index 140d0ded8..ec42c023f 100644 --- a/Flipcash/Core/Screens/Profile/UserProfileScreen.swift +++ b/Flipcash/Core/Screens/Profile/UserProfileScreen.swift @@ -96,10 +96,10 @@ private struct UserProfileContent: View { // one that asks someone else to look, then the one that ends the relationship. // Same shape as a group's profile, where leaving holds the last place. if let conversationID { - ChatMuteRow(conversationID: conversationID, insets: rowInsets, chevron: .secondary) + ChatMuteRow(conversationID: conversationID, insets: rowInsets) } - ReportRow(target: .user(model.userID), insets: rowInsets, chevron: .secondary) + ReportRow(target: .user(model.userID), insets: rowInsets) Row(insets: rowInsets) { Image(systemName: "nosign") @@ -107,10 +107,6 @@ private struct UserProfileContent: View { Text("Block") .foregroundStyle(.textMain) Spacer() - // Secondary (alpha-white) chevron, matching the profile card. - Image(systemName: "chevron.right") - .font(.caption2) - .foregroundStyle(.textSecondary) } action: { dialogItem = blockDialog() }