Bug 325065 - [KPeople] Remove contact does not remove the contact
Summary: [KPeople] Remove contact does not remove the contact
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR normal
Target Milestone: 0.7-beta
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-18 15:40 UTC by Daniele E. Domenichelli
Modified: 2013-09-23 12:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
ddomenichelli: kpeople+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele E. Domenichelli 2013-09-18 15:40:53 UTC
In kpeople version, if you remove a contact (right click -> remove contact), the contact stays and has no right click menu. (Contact was a single contact, not a meta-contact)
After restarting contact list, the contact is still there, without a right-click popup menu
Comment 1 David Edmundson 2013-09-23 01:22:00 UTC
from the feeder 

void Account::onAllKnownContactsChanged(const Tp::Contacts &added, const Tp::Contacts &removed)
{
    // For each added contact, let's check if we already have a Contact wrapper for it
    Q_FOREACH (const Tp::ContactPtr &contact, added) {
        if (!m_contacts.contains(contact)) {
            // It's a brand new one
            onNewContact(contact);
        }
    }

    // If contacts are removed, we don't actually need to do anything!
    Q_UNUSED(removed);
}

I don't understand the logic behind the comment here.
Comment 2 David Edmundson 2013-09-23 01:38:00 UTC
Removed a contact with NeomukShell, contact was removed from the model perfectly.

Should be a simple enough fix.

Ideally we should also compare contacts on startup - but that can be a later issue.
Comment 3 Martin Klapetek 2013-09-23 09:01:39 UTC
(In reply to comment #1)
>     // If contacts are removed, we don't actually need to do anything!
>     Q_UNUSED(removed);
> }
> 
> I don't understand the logic behind the comment here.

I think the logic might have been "there's a separate slot for that". But with all that simplification we've done, it might just got lost. Or was never actually done at all.
Comment 4 David Edmundson 2013-09-23 12:54:47 UTC
Git commit 1f6c24077575af342ce085db0b376cf7432aa700 by David Edmundson.
Committed on 23/09/2013 at 01:54.
Pushed by davidedmundson into branch 'master'.

Remove contacts from Nepomuk when removed from Tp.

Also fix adding contacts at runtime

REVIEW:112886

M  +9    -0    kpeople/nepomuk-feeder/abstract-storage.h
M  +12   -2    kpeople/nepomuk-feeder/account.cpp
M  +2    -0    kpeople/nepomuk-feeder/account.h
M  +2    -0    kpeople/nepomuk-feeder/controller.cpp
M  +12   -1    kpeople/nepomuk-feeder/nepomuk-storage.cpp
M  +1    -0    kpeople/nepomuk-feeder/nepomuk-storage.h

http://commits.kde.org/telepathy-common-internals/1f6c24077575af342ce085db0b376cf7432aa700