mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-03 15:46:18 +00:00
ios: menu to hide revealed chat item (#1490)
This commit is contained in:
committed by
GitHub
parent
f3630d934c
commit
ffbff93374
@@ -480,6 +480,9 @@ struct ChatView: View {
|
||||
if ci.meta.editable && !mc.isVoice {
|
||||
menu.append(editAction())
|
||||
}
|
||||
if revealed {
|
||||
menu.append(hideUIAction())
|
||||
}
|
||||
menu.append(deleteUIAction())
|
||||
} else if ci.meta.itemDeleted {
|
||||
menu.append(revealUIAction())
|
||||
@@ -562,6 +565,17 @@ struct ChatView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func hideUIAction() -> UIAction {
|
||||
UIAction(
|
||||
title: NSLocalizedString("Hide", comment: "chat item action"),
|
||||
image: UIImage(systemName: "eye.slash")
|
||||
) { _ in
|
||||
withAnimation {
|
||||
revealed = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func deleteUIAction() -> UIAction {
|
||||
UIAction(
|
||||
|
||||
Reference in New Issue
Block a user