[Kde-pim] Review Request: Notify parent collection as well as all virtual collections when item changes

Volker Krause vkrause at kde.org
Sun Dec 16 13:20:32 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107722/#review23527
-----------------------------------------------------------


Thanks, general approach looks good, just some comments on the implementation below.


server/src/storage/entities-header.xsl
<http://git.reviewboard.kde.org/r/107722/#comment18076>

    Putting specific/hardcoded code into the code generator is a bit ugly, please move that into an external class/namespace. We already have a bunch of helpers for queries, and there are some more in Datastore.



server/src/storage/entities-source.xsl
<http://git.reviewboard.kde.org/r/107722/#comment18077>

    For creating queries, please use the methods of the generated objects rather than hardcoding table or column names. This will silently break if we change things in the schema otherwise.



server/src/storage/notificationcollector.cpp
<http://git.reviewboard.kde.org/r/107722/#comment18078>

    Might make sense to move parts of this to before the for loop, some of these methods looking like simple accessors actually perform database queries.


- Volker Krause


On Dec. 14, 2012, 2:56 p.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107722/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2012, 2:56 p.m.)
> 
> 
> Review request for Akonadi.
> 
> 
> Description
> -------
> 
> When an PimItem is changed, only it's real parent collections is notified. This patch changes behaviour of NotificationCollector to notify the parent collections as well as all virtual collections the item is linked to. AFAIK we don't need to handle removing or adding of item, because the VC is notified through Link/Unlink operation.
> 
> As a result, when you mark an unread email in "Last Search" folder as read, the "Unread" count is updated in item's parent collection and in the "Last Search" folder too (works only with patch from http://git.reviewboard.kde.org/r/107715/). It works the other way around too (i.e. marking an item as read in it's parent collection updates the parent collections an "Last Search" Unread count).
> 
> 
> Diffs
> -----
> 
>   server/src/storage/entities-header.xsl 189d427 
>   server/src/storage/entities-source.xsl 82fe77d 
>   server/src/storage/notificationcollector.cpp 72d3243 
> 
> Diff: http://git.reviewboard.kde.org/r/107722/diff/
> 
> 
> Testing
> -------
> 
> Had an unread email from inbox in "Last Search" results, marked it as read in inbox, "Unread" count updated in both inbox and "Last Search" folders.
> 
> 
> Thanks,
> 
> Dan Vrátil
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list