diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index c9816e3584..0f67c4cf5a 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -732,7 +732,7 @@ struct ChatView: View { } return Group { if case .chatBanner = ci.content { - chatBannerView() + ChatBannerView(chat: chat) } else { let voiceNoFrame = voiceWithoutFrame(ci) let maxWidth = cInfo.chatType == .group @@ -810,26 +810,49 @@ struct ChatView: View { } } - private func chatBannerView() -> some View { - VStack { - Spacer().frame(height: 60) + struct ChatBannerView: View { + @Environment(\.dynamicTypeSize) private var userFont: DynamicTypeSize + @ObservedObject var chat: Chat - ChatInfoImage(chat: chat, size: 103, backgroundColor: theme.colors.background) - Text(chat.chatInfo.chatViewName) - .font(.title3) - .multilineTextAlignment(.center) - .lineLimit(2) - let fullName = chat.chatInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines) - if fullName != "" && fullName != chat.chatInfo.chatViewName && fullName != chat.chatInfo.chatViewName.trimmingCharacters(in: .whitespacesAndNewlines) { - Text(chat.chatInfo.fullName) - .font(.headline) - .multilineTextAlignment(.center) - .lineLimit(3) + var body: some View { + VStack { + Spacer().frame(height: 60) + + VStack(spacing: 8) { + ChatInfoImage(chat: chat, size: dynamicSize(userFont).profileImageSize) + Text(chat.chatInfo.displayName) + .font(.title3) + .multilineTextAlignment(.center) + .lineLimit(2) + .frame(maxWidth: 240) + let fullName = chat.chatInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines) + if fullName != "" && fullName != chat.chatInfo.displayName && fullName != chat.chatInfo.displayName.trimmingCharacters(in: .whitespacesAndNewlines) { + Text(chat.chatInfo.fullName) + .font(.headline) + .fontWeight(.regular) + .multilineTextAlignment(.center) + .lineLimit(2) + .frame(maxWidth: 260) + } + if let shortDescr = chat.chatInfo.shortDescr { + Text(shortDescr) + .font(.subheadline) + .multilineTextAlignment(.center) + .lineLimit(3) + .padding(.horizontal) + } + } + .frame(maxWidth: .infinity) + .padding() + .background( + RoundedRectangle(cornerRadius: 18) + .fill(Color(uiColor: .tertiarySystemGroupedBackground)) + ) + .padding(.horizontal) + + Spacer().frame(height: 60) } - - Spacer().frame(height: 60) } - .frame(maxWidth: 160) } private var connectingText: LocalizedStringKey? {