From 80a8d247303464d6fff960a41c92554e9a895636 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Fri, 1 Aug 2025 15:30:10 +0200 Subject: [PATCH] Fix "Encrypted Conversation" banner in chatrooms --- .../Main/Conversations/Fragments/UIList.swift | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Linphone/UI/Main/Conversations/Fragments/UIList.swift b/Linphone/UI/Main/Conversations/Fragments/UIList.swift index 8b168a1f2..59622cec2 100644 --- a/Linphone/UI/Main/Conversations/Fragments/UIList.swift +++ b/Linphone/UI/Main/Conversations/Fragments/UIList.swift @@ -137,7 +137,7 @@ struct UIList: UIViewRepresentable { if SharedMainViewModel.shared.displayedConversation != nil && SharedMainViewModel.shared.displayedConversation!.encryptionEnabled { let footerView = Self.makeFooterView() - footerView.frame = CGRect(x: 0, y: 0, width: tableView.bounds.width, height: 120) + footerView.frame = CGRect(x: 0, y: 0, width: tableView.bounds.width, height: 80) footerView.transform = CGAffineTransformMakeScale(1, -1) tableView.tableFooterView = footerView } @@ -212,9 +212,9 @@ struct UIList: UIViewRepresentable { .inset(by: 0.5) .stroke(Color.blueInfo500, lineWidth: 0.5) ) - .padding(10) + .padding(.horizontal, 10) } - .frame(height: 120) + .frame(height: 80) ) host.view.backgroundColor = .clear return host.view @@ -565,18 +565,6 @@ struct UIList: UIViewRepresentable { return configuration } - - func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { - if section == tableView.numberOfSections - 1 { - let contentHeight = tableView.contentSize.height - let tableHeight = tableView.frame.height - let progressViewDisplayed = section < parent.conversationViewModel.conversationMessagesSection.count - && parent.conversationViewModel.conversationMessagesSection[section].rows.count < parent.conversationViewModel.displayedConversationHistorySize - let extraSpace = max(progressViewDisplayed ? 50 : 0, tableHeight - contentHeight - 20) - return extraSpace - } - return 0 - } } }