From bf46e0dc577490ad4d82319268bdb1e67ec7fa5f Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Tue, 27 Sep 2022 20:24:25 +0400 Subject: [PATCH] ios: don't show clear swipe action for empty chats (#1139) --- apps/ios/Shared/Views/ChatList/ChatListNavLink.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift b/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift index aa73faa2c..aea9fda6e 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListNavLink.swift @@ -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))