From c9bfab0b1446e9071caf9c38999ae7767597522b Mon Sep 17 00:00:00 2001 From: cheykrym Date: Wed, 8 Oct 2025 05:23:33 +0300 Subject: [PATCH] delete user strikethrough --- yobble/Views/Tab/ChatsTab.swift | 38 ++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/yobble/Views/Tab/ChatsTab.swift b/yobble/Views/Tab/ChatsTab.swift index 6005666..b26ba4a 100644 --- a/yobble/Views/Tab/ChatsTab.swift +++ b/yobble/Views/Tab/ChatsTab.swift @@ -801,11 +801,20 @@ private struct ChatRowView: View { VStack(alignment: .leading, spacing: 4) { if let officialName = officialFullName { HStack(spacing: 6) { - Text(officialName) - .fontWeight(.semibold) - .foregroundColor(.primary) - .lineLimit(1) - .truncationMode(.tail) + if #available(iOS 16.0, *) { + Text(officialName) + .fontWeight(.semibold) + .foregroundColor(.primary) + .lineLimit(1) + .truncationMode(.tail) + .strikethrough(isDeletedUser, color: Color.secondary) + } else { + Text(officialName) + .fontWeight(.semibold) + .foregroundColor(.primary) + .lineLimit(1) + .truncationMode(.tail) + } Image(systemName: "checkmark.seal.fill") .foregroundColor(Color.accentColor) @@ -820,11 +829,20 @@ private struct ChatRowView: View { // .truncationMode(.tail) // } } else { - Text(title) - .fontWeight(chat.unreadCount > 0 ? .semibold : .regular) - .foregroundColor(.primary) - .lineLimit(1) - .truncationMode(.tail) + if #available(iOS 16.0, *) { + Text(title) + .fontWeight(chat.unreadCount > 0 ? .semibold : .regular) + .foregroundColor(.primary) + .lineLimit(1) + .truncationMode(.tail) + .strikethrough(isDeletedUser, color: Color.secondary) + } else { + Text(title) + .fontWeight(chat.unreadCount > 0 ? .semibold : .regular) + .foregroundColor(.primary) + .lineLimit(1) + .truncationMode(.tail) + } } Text(messagePreview)