1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

Conversation : remove zero member conversation

(Note: this is a work around, need investigation)

Change-Id: I43d3c26352a068d29486da38b3e25487f10cd9fa
This commit is contained in:
Xavier Jouslin de Noray 2023-08-25 15:24:57 -04:00
parent b26259dac8
commit c8b371e77a

View file

@ -93,6 +93,7 @@ bool
ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
{
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
auto rx = filterRegularExpression();
auto uriStripper = URI(rx.pattern());
bool stripScheme = (uriStripper.schemeType() < URI::SchemeType::COUNT__);
@ -104,6 +105,11 @@ ConversationListProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& s
rx.setPattern(uriStripper.format(flags));
using namespace ConversationList;
if (index.data(Role::Uris).toStringList().isEmpty()) {
// TODO: Find out why, and fix in libjami/libjamiclient.
qCritical() << "Filtering 0 member conversation. Fix me";
return false;
}
QStringList toFilter;
toFilter += index.data(Role::Title).toString();