diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift index edfd3e04..e012585b 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorView.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorView.swift @@ -33,11 +33,18 @@ public struct StatusEditorView: View { TextView($viewModel.statusText, $viewModel.selectedRange) .placeholder("What's on your mind") .padding(.horizontal, .layoutPadding) + StatusEditorMediaView(viewModel: viewModel) if let status = viewModel.embededStatus { StatusEmbededView(status: status) .padding(.horizontal, .layoutPadding) + .disabled(true) + } else if let status = viewModel.replyToStatus { + Divider() + .padding(.top, 20) + StatusEmbededView(status: status) + .padding(.horizontal, .layoutPadding) + .disabled(true) } - StatusEditorMediaView(viewModel: viewModel) Spacer() } .padding(.top, 8) diff --git a/Packages/Status/Sources/Status/Editor/StatusEditorViewModelMode.swift b/Packages/Status/Sources/Status/Editor/StatusEditorViewModelMode.swift index fd5a61bd..e145ba56 100644 --- a/Packages/Status/Sources/Status/Editor/StatusEditorViewModelMode.swift +++ b/Packages/Status/Sources/Status/Editor/StatusEditorViewModelMode.swift @@ -31,9 +31,9 @@ extension StatusEditorViewModel { case .new, .mention: return "New Post" case .edit: - return "Edit your post" + return "Editing your post" case let .replyTo(status): - return "Reply to \(status.reblog?.account.displayName ?? status.account.displayName)" + return "Replying to \(status.reblog?.account.displayName ?? status.account.displayName)" case let .quote(status): return "Quote of \(status.reblog?.account.displayName ?? status.account.displayName)" } diff --git a/Packages/Status/Sources/Status/Row/StatusRowView.swift b/Packages/Status/Sources/Status/Row/StatusRowView.swift index ea4aa843..bc5a99cd 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowView.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowView.swift @@ -39,10 +39,10 @@ public struct StatusRowView: View { VStack(alignment: .leading) { if !viewModel.isCompact { reblogView - replyView + replyView } statusView - if !viewModel.isCompact { + if !viewModel.isCompact && viewModel.showActions { StatusActionsView(viewModel: viewModel) .padding(.vertical, 8) .tint(viewModel.isFocused ? theme.tintColor : .gray) diff --git a/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift b/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift index 9c39e1d8..fb4b24d8 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift @@ -7,6 +7,7 @@ public class StatusRowViewModel: ObservableObject { let status: Status let isCompact: Bool let isFocused: Bool + let showActions: Bool @Published var favouritesCount: Int @Published var isFavourited: Bool @@ -27,10 +28,12 @@ public class StatusRowViewModel: ObservableObject { public init(status: Status, isCompact: Bool = false, - isFocused: Bool = false) { + isFocused: Bool = false, + showActions: Bool = true) { self.status = status self.isCompact = isCompact self.isFocused = isFocused + self.showActions = showActions if let reblog = status.reblog { self.isFavourited = reblog.favourited == true self.isReblogged = reblog.reblogged == true