mycozycloud/cozy-home — pull request #178 by bnjbvr (2014-04-27 00:43:55+00:00)
Title: Fixes #13: update notification

Hi!

Thanks Frank for all the details, actually I wasn't expecting that much :) So I made a version that checks the version field of package files, on the regular basis of once a day (easier than doing it the first time of day the user logs in, as we would have had to store this time in particular).

If there's an update, it will emit a notification to the user. I am not good at UX / UI so I will let to experienced people the choice of the right thing to do / show. For me, having a notification is good enough.

There was an edge case that calls for git hash (but I won't implement it in this PR): if an application exists before this update system is added, then the application won't have a version field in database, and so we have to set it as needing an update, because we could miss an update otherwise. In the meanwhile, it implies that even if an application is up to date but doesn't have the version field, it will ask for an update. I think we could just retrieve the version number in the package.json file, but that seems too much complexity for low benefits, so I'm fine with the current approach.

Let me know if you have some suggestions or if there are some fixes that I'd need to do.
Cheers!