Bug 299092 - Don't create server-side group 'Ungrouped' when removing contact from all groups
Summary: Don't create server-side group 'Ungrouped' when removing contact from all groups
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: common-internals (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR normal
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-30 09:38 UTC by Martin Klapetek
Modified: 2012-07-06 12:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Klapetek 2012-04-30 09:38:07 UTC
If user removes contact from all groups, it creates a server-side group called 'Ungrouped' and puts it there. However the group should only be local, not server-side and the contact should have all groups removed on teh server.

It works for our client, but breaks other clients, because everyone handles non-grouped contacts on its own and we put contacts in just another (server) group insted of removing them all.
Comment 1 David Edmundson 2012-05-07 14:06:59 UTC
How I want this fixed:

Add an additional role to the groupsModel called "GroupNameRole".

Instead of making ungrouped a group called "Ungrouped" it becomes a group called "".
The DisplayRole returns the same as the GroupNameRole _except_ in the case where the group == "" at which point it returns i18n("Ungrouped").

the code in the contact list should always use the GroupRole when adding contacts to groups. (possibly wrap it in an "if" statement). The display will look as it does now.

This also tidies the code as it eliminates the need for that m_translatedUngrouped in the groups model.
Comment 2 David Edmundson 2012-05-30 22:03:17 UTC
Git commit 6d6d00eb2721949820a3ff560671f90fb0a99563 by David Edmundson.
Committed on 31/05/2012 at 00:00.
Pushed by davidedmundson into branch 'master'.

Use GroupNameRole and DisplayRole for groups model correctly. Do not try and add someone to "ungrouped" group
Reviewed-by: Martin Klapetek

M  +1    -1    abstract-contact-delegate.cpp
M  +5    -3    contact-list-widget.cpp

http://commits.kde.org/telepathy-contact-list/6d6d00eb2721949820a3ff560671f90fb0a99563