Skip to content
Snippets Groups Projects
Commit c8b371e7 authored by Xavier Jouslin de Noray's avatar Xavier Jouslin de Noray
Browse files

Conversation : remove zero member conversation

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

Change-Id: I43d3c26352a068d29486da38b3e25487f10cd9fa
parent b26259da
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment