From a2a29628a75f67703803bd057f402cea513857d5 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Wed, 21 Dec 2022 22:36:05 +0000 Subject: [PATCH] ios: remove unused code (#1621) --- apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift | 8 -------- apps/ios/Shared/Views/Chat/ChatItemView.swift | 10 +++++----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift b/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift index 63c90d35cf..ca23725ea7 100644 --- a/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift +++ b/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift @@ -21,14 +21,6 @@ struct CIMetaView: View { ciMetaText(chatItem.meta, chatTTL: chat.chatInfo.timedMessagesTTL, color: metaColor) } } - - private func statusImage(_ icon: String, _ color: Color, _ maxHeight: CGFloat = 8) -> some View { - Image(systemName: icon) - .resizable() - .aspectRatio(contentMode: .fit) - .foregroundColor(color) - .frame(maxHeight: maxHeight) - } } func ciMetaText(_ meta: CIMeta, chatTTL: Int?, color: Color = .clear) -> Text { diff --git a/apps/ios/Shared/Views/Chat/ChatItemView.swift b/apps/ios/Shared/Views/Chat/ChatItemView.swift index 0b001c2a50..4d7d87b62e 100644 --- a/apps/ios/Shared/Views/Chat/ChatItemView.swift +++ b/apps/ios/Shared/Views/Chat/ChatItemView.swift @@ -62,10 +62,10 @@ struct ChatItemContentView: View { case .sndGroupEvent: eventItemView() case .rcvConnEvent: eventItemView() case .sndConnEvent: eventItemView() - case let .rcvChatFeature(feature, enabled, param): chatFeatureView(feature, enabled.iconColor, param) - case let .sndChatFeature(feature, enabled, param): chatFeatureView(feature, enabled.iconColor, param) - case let .rcvGroupFeature(feature, preference, param): chatFeatureView(feature, preference.enable.iconColor, param) - case let .sndGroupFeature(feature, preference, param): chatFeatureView(feature, preference.enable.iconColor, param) + case let .rcvChatFeature(feature, enabled, _): chatFeatureView(feature, enabled.iconColor) + case let .sndChatFeature(feature, enabled, _): chatFeatureView(feature, enabled.iconColor) + case let .rcvGroupFeature(feature, preference, _): chatFeatureView(feature, preference.enable.iconColor) + case let .sndGroupFeature(feature, preference, _): chatFeatureView(feature, preference.enable.iconColor) case let .rcvChatFeatureRejected(feature): chatFeatureView(feature, .red) case let .rcvGroupFeatureRejected(feature): chatFeatureView(feature, .red) } @@ -87,7 +87,7 @@ struct ChatItemContentView: View { CIEventView(chatItem: chatItem) } - private func chatFeatureView(_ feature: Feature, _ iconColor: Color, _ param: Int? = nil) -> some View { + private func chatFeatureView(_ feature: Feature, _ iconColor: Color) -> some View { CIChatFeatureView(chatItem: chatItem, feature: feature, iconColor: iconColor) } }