Bug 296939 - Like from SLC doesnt show the star rating
Summary: Like from SLC doesnt show the star rating
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Share Like Connect (show other bugs)
Version: unspecified
Platform: Meego/Harmattan Linux
: NOR normal
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 07:14 UTC by Fania Bremmer
Modified: 2012-04-24 00:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fania Bremmer 2012-03-28 07:14:15 UTC
on 2012-03-27-15-24-basyskom-plasma-active-testing-meego-usb-live.iso 

- open an image in the imageviewer
- hit "like from SLC"
- tap Like to give a star rating
-> see that there is no visual feedback that the rating works -> no stars are highlighted
Comment 1 Marco Martin 2012-03-28 08:34:39 UTC
Git commit 4da77d6ff103cb6651ad817f4829fb354929a6f9 by Marco Martin.
Committed on 28/03/2012 at 10:33.
Pushed by mart into branch 'master'.

revert f48becacac12f337579526c6dfddfa253206ce4f

it did break star rating in SLC

M  +2    -17   dataengines/metadata/metadataengine.cpp
M  +0    -1    dataengines/metadata/metadataengine.h

http://commits.kde.org/plasma-mobile/4da77d6ff103cb6651ad817f4829fb354929a6f9
Comment 2 Lamarque V. Souza 2012-04-04 11:42:31 UTC
The feedback works now but the number of highlighted stars is lost once you select another "likeably" item. For example, you set the number of starts of an image, then select another image, when you go back to the first image the number of stars is zero.

I tested 2012-03-31-09-53-basyskom-plasma-active-devel-meego-usb-live.iso, which is supposed to include the commit above.
Comment 3 Fania Bremmer 2012-04-04 12:03:38 UTC
I can confirm the problem with the lost stars, reported by lamarque
tested on 2012-04-04-11-10-basyskom-plasma-active-testing-meego-usb-live.iso
Comment 4 Marco Martin 2012-04-04 14:15:39 UTC
Git commit 211981d6ff8c5ed7a37dbc63595b443909a8a6a9 by Marco Martin.
Committed on 04/04/2012 at 16:14.
Pushed by mart into branch 'master'.

drop the old private datamanegement usage

now is used internally in Nepomuk::Resource

D  +0    -466  dataengine/providers/rating/datamanagement.h
M  +1    -3    dataengine/providers/rating/ratingProvider.cpp

http://commits.kde.org/share-like-connect/211981d6ff8c5ed7a37dbc63595b443909a8a6a9
Comment 5 Lamarque V. Souza 2012-04-04 20:39:25 UTC
(In reply to comment #2)
> The feedback works now but the number of highlighted stars is lost once you
> select another "likeably" item. For example, you set the number of starts of
> an image, then select another image, when you go back to the first image the
> number of stars is zero.

If I reboot the device then the stars appears correctly. I think the containment is not updating the items' properties from nepomuk when they are changed. I noticed this problem when debugging the problem with resources of private activities disappearing after reboot.
Comment 6 Lamarque V. Souza 2012-04-05 00:51:32 UTC
This seems to be a problem with nepomuk's cache. Metadata dataengine successfully stores the new rating value, but MetadataEngine::prepareSource when it instantiate a Nepomuk::Resource object and calls "container->setResource(resource)" it reads the old value from the Nepomuk::Resource object instead of the new one. I tried adding Nepomuk::ResourceManager::clearCache() before instantiating the object but it did not work.
Comment 7 Marco Martin 2012-04-05 07:59:10 UTC
this seems related to all the changes have been in resource caching (that caused the slowdown regressions last weeks too)
did you try with the last commit above in slc? using setpropoerty instead of the old semi private api seems to fix things here (will port the rest using that api too) i think in that case Resource notifies itself internally that a property has changed, marking the cache as dirty
Comment 8 Lamarque V. Souza 2012-04-05 12:23:01 UTC
The commit above fixed the problem.
Comment 9 Lamarque V. Souza 2012-04-24 00:42:59 UTC
Fixed in 2012-04-23-16-57-basyskom-plasma-active-testing-meego-usb-live.iso