mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-06 01:09:30 +00:00
Some UI Fixes
This commit is contained in:
parent
ca9ce92053
commit
dcccc459c2
3 changed files with 35 additions and 22 deletions
|
@ -90,6 +90,7 @@ struct StatusEditorMediaView: View {
|
|||
|
||||
@ViewBuilder
|
||||
private func makeImageMenu(container: StatusEditorViewModel.ImageContainer) -> some View {
|
||||
if !viewModel.mode.isEditing {
|
||||
Button {
|
||||
editingContainer = container
|
||||
} label: {
|
||||
|
@ -97,6 +98,7 @@ struct StatusEditorMediaView: View {
|
|||
"Edit description" : "Add description",
|
||||
systemImage: "pencil.line")
|
||||
}
|
||||
}
|
||||
Button(role: .destructive) {
|
||||
withAnimation {
|
||||
viewModel.mediasImages.removeAll(where: { $0.id == container.id })
|
||||
|
|
|
@ -7,6 +7,15 @@ extension StatusEditorViewModel {
|
|||
case edit(status: Status)
|
||||
case quote(status: Status)
|
||||
|
||||
var isEditing: Bool {
|
||||
switch self {
|
||||
case .edit:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
var replyToStatus: Status? {
|
||||
switch self {
|
||||
case let .replyTo(status):
|
||||
|
|
|
@ -251,6 +251,7 @@ public struct StatusRowView: View {
|
|||
}
|
||||
|
||||
if account.account?.id == viewModel.status.account.id {
|
||||
Section("Your post") {
|
||||
Button {
|
||||
Task {
|
||||
if viewModel.isPinned {
|
||||
|
@ -272,4 +273,5 @@ public struct StatusRowView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue