ios: don't show clear swipe action for empty chats (#1139)

This commit is contained in:
JRoberts
2022-09-27 20:24:25 +04:00
committed by GitHub
parent 937492c204
commit bf46e0dc57

View File

@@ -57,7 +57,9 @@ struct ChatListNavLink: View {
}
}
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
clearChatButton()
if !chat.chatItems.isEmpty {
clearChatButton()
}
Button {
AlertManager.shared.showAlert(
contact.ready
@@ -118,7 +120,9 @@ struct ChatListNavLink: View {
}
}
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
clearChatButton()
if !chat.chatItems.isEmpty {
clearChatButton()
}
if (groupInfo.membership.memberCurrent) {
Button {
AlertManager.shared.showAlert(leaveGroupAlert(groupInfo))