Bug 315620 - groups with zero contacts are displayed
Summary: groups with zero contacts are displayed
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unclassified
Component: contactlist (show other bugs)
Version: git-latest
Platform: Other Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-22 11:16 UTC by Alin M Elena
Modified: 2013-07-22 17:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
zero group (48.75 KB, image/png)
2013-02-22 11:16 UTC, Alin M Elena
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alin M Elena 2013-02-22 11:16:29 UTC
groups with zero contacts are displayed
groups with zero contacts are displayed see the attach

Reproducible: Always
Comment 1 Alin M Elena 2013-02-22 11:16:56 UTC
Created attachment 77504 [details]
zero group
Comment 2 David Edmundson 2013-02-22 11:22:01 UTC
This is due to code being commented out in ContactsFilterModel::filterAcceptsGroup

re-enabling it, however, causes no groups to be shown.
Comment 3 Martin Klapetek 2013-02-22 15:22:52 UTC
There's a race condition/the counting happens in a wrong place.

I showed you in Brussels on a paper if you remember. I'll try to put it back together and post here.
Comment 4 Martin Klapetek 2013-02-22 17:18:29 UTC
Ok, the case I had in Brussels was with my KPeople model, the situation with our models is a bit different. Here are my findings:
 - the groups are correctly counted and properly filtered (filterAcceptsRow/filterAcceptsGroup returns correct values)
 - whenever we return false in filterAcceptsGroup, it all breaks
 - if we switch filtering of offline contacts off/on, it works properly (the filter is invalidated)

As of now, I'm unsure where the problem of showing no groups at all is.
Comment 5 David Edmundson 2013-07-22 17:35:14 UTC
Git commit ee230048214fd33a4064fd991b5e3f3956182577 by David Edmundson.
Committed on 22/07/2013 at 17:29.
Pushed by davidedmundson into branch 'kde-telepathy-0.6'.

Restore hiding empty groups

REVIEW: 111601

M  +6    -4    KTp/Models/contacts-filter-model.cpp

http://commits.kde.org/telepathy-common-internals/ee230048214fd33a4064fd991b5e3f3956182577