[Merge] lp:~phablet-team/gallery-app/gallery-app-restrict-pick-content-type into lp:gallery-app
Ugo Riboni
ugo.riboni at canonical.com
Fri Aug 15 14:08:37 UTC 2014
> 201 + if (mediaTypeFilter == "pictures") mediaTypeFilter = "Photo";
> 202 + else if (mediaTypeFilter == "videos") mediaTypeFilter = "Video";
> 203 + else mediaTypeFilter = "";
>
> Why do we need this translation step? Isn’t it reasonable to request either
> "Photo" or "Video" or "" directly?
The content hub is passing us a value here (in mediaTypeFilter) which represents the content type that the hub wants from us. What it pass to us is "pictures", "video" or "unknown" (or potentially something else we can't handle). Since we want to do as little work as possible in the comparator, we do the translation here so that we can later compare the class name of the items with the requested type ("Photo" or "Video").
--
https://code.launchpad.net/~phablet-team/gallery-app/gallery-app-restrict-pick-content-type/+merge/230776
Your team Ubuntu Phablet Team is subscribed to branch lp:gallery-app.
More information about the Ubuntu-reviews
mailing list