core: Ensure we always notify of new Individuals
authorPhilip Withnall <philip@tecnocode.co.uk>
Tue, 6 Sep 2011 20:57:42 +0000 (21:57 +0100)
committerRaul Gutierrez Segales <rgs@collabora.co.uk>
Wed, 7 Sep 2011 21:53:36 +0000 (22:53 +0100)
commit150b7579f1069f561f2069c9efad864b9c87e2e9
tree4e7c75d9a358f1e99d148b445728b43e094db181
parentb9f391ab8c4170772b27c81b0e1ce651ec37360d
core: Ensure we always notify of new Individuals

In the following situation, it was possible for
IndividualAggregator.individuals_changed_detailed to not emit a notification
that an individual was added:

If two personas were added by a given store in the same emission of
PersonaStore.personas_changed, the IA would create an Individual, i1, from
the first and add a mapping (null → i1) to the change set. It would then
process the second, destroying the first individual and creating a new
Individual, i2, (correctly) containing both personas. In doing so, it would
remove the mapping (null → i1) from the change set, but would incorrectly
not add a mapping (null → i2) in its place.

This situation can be extended to others where a single new Individual is
formed from multiple new personas coming from a single emission of
PersonaStore.personas_changed.

Closes: bgo#657282 (again)
folks/individual-aggregator.vala