ios 15
This commit is contained in:
parent
ec70d1f59d
commit
59d2f8c161
@ -244,104 +244,213 @@ struct PrivateChatView: View {
|
||||
|
||||
let topPadding: CGFloat = decoratedMessage.showHorns ? 5 : -12
|
||||
let verticalPadding: CGFloat = hasDecorations ? 0 : 0
|
||||
|
||||
return HStack(alignment: .bottom, spacing: 8) {
|
||||
if isCurrentUser { Spacer(minLength: 32) }
|
||||
|
||||
messageBubble(
|
||||
for: message,
|
||||
decorations: decoratedMessage,
|
||||
isCurrentUser: isCurrentUser
|
||||
)
|
||||
|
||||
if !isCurrentUser { Spacer(minLength: 32) }
|
||||
}
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.top, topPadding)
|
||||
.padding(.vertical, verticalPadding)
|
||||
.contextMenu {
|
||||
if isCurrentUser {
|
||||
if message.isViewed == true {
|
||||
Text("Прочитано") // Placeholder for read status
|
||||
|
||||
if #available(iOS 16.0, *) {
|
||||
return HStack(alignment: .bottom, spacing: 8) {
|
||||
if isCurrentUser { Spacer(minLength: 32) }
|
||||
|
||||
messageBubble(
|
||||
for: message,
|
||||
decorations: decoratedMessage,
|
||||
isCurrentUser: isCurrentUser
|
||||
)
|
||||
|
||||
if !isCurrentUser { Spacer(minLength: 32) }
|
||||
}
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.top, topPadding)
|
||||
.padding(.vertical, verticalPadding)
|
||||
.contextMenu(menuItems: {
|
||||
if isCurrentUser {
|
||||
if message.isViewed == true {
|
||||
Text("Прочитано") // Placeholder for read status
|
||||
}
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Edit action
|
||||
}) {
|
||||
Text("Изменить")
|
||||
Image(systemName: "pencil")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}
|
||||
} else {
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}
|
||||
}
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Edit action
|
||||
}) {
|
||||
Text("Изменить")
|
||||
Image(systemName: "pencil")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}
|
||||
} else {
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}, preview: {
|
||||
messageBubble(
|
||||
for: message,
|
||||
decorations: decoratedMessage,
|
||||
isCurrentUser: isCurrentUser
|
||||
)
|
||||
})
|
||||
} else {
|
||||
return HStack(alignment: .bottom, spacing: 8) {
|
||||
if isCurrentUser { Spacer(minLength: 32) }
|
||||
|
||||
messageBubble(
|
||||
for: message,
|
||||
decorations: decoratedMessage,
|
||||
isCurrentUser: isCurrentUser
|
||||
)
|
||||
|
||||
if !isCurrentUser { Spacer(minLength: 32) }
|
||||
}
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.top, topPadding)
|
||||
.padding(.vertical, verticalPadding)
|
||||
.contextMenu {
|
||||
if isCurrentUser {
|
||||
if message.isViewed == true {
|
||||
Text("Прочитано") // Placeholder for read status
|
||||
}
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Edit action
|
||||
}) {
|
||||
Text("Изменить")
|
||||
Image(systemName: "pencil")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}
|
||||
} else {
|
||||
Button(action: {
|
||||
// Reply action
|
||||
}) {
|
||||
Text("Ответить")
|
||||
Image(systemName: "arrowshape.turn.up.left")
|
||||
}
|
||||
Button(action: {
|
||||
// Copy action
|
||||
}) {
|
||||
Text("Копировать")
|
||||
Image(systemName: "doc.on.doc")
|
||||
}
|
||||
Button(action: {
|
||||
// Pin action
|
||||
}) {
|
||||
Text("Закрепить")
|
||||
Image(systemName: "pin")
|
||||
}
|
||||
Button(action: {
|
||||
// Forward action
|
||||
}) {
|
||||
Text("Переслать")
|
||||
Image(systemName: "arrowshape.turn.up.right")
|
||||
}
|
||||
Button(role: .destructive, action: {
|
||||
// Delete action
|
||||
}) {
|
||||
Text("Удалить")
|
||||
Image(systemName: "trash")
|
||||
}
|
||||
Button(action: {
|
||||
// Select action
|
||||
}) {
|
||||
Text("Выбрать")
|
||||
Image(systemName: "checkmark.circle")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user