xebia-functional / nine-cards-v2

An Open Source Android Launcher built with Scala on Android
http://www.9cards.io/
Other
183 stars 20 forks source link

Subscribe after add a collection #1174

Closed fedefernandez closed 7 years ago

fedefernandez commented 7 years ago

This PR brings some important changes (fixes #861):

Adds owned field in API model The backend service is returning this flag to indicate if the collection is owned by the user.

Removes the Subscribed status from PublicCollectionStatus We already have a flag indicating if the user is subscribed to that collection (sharedCollectionSubscribed), we don't need this status. Also, was inconsistent because a collection with status Subscribed is also PublishedByOther. In this way, we eliminate this discrepancy.

Adds a new field to SharedCollection called locallyAdded This field indicates if the shared collection is in the local database. This allows to the UI just ask for this status in an explicit way.

Subscribe after adding a shared collection Every time the user adds a new shared collection if this collection is yours, the status is set to PublishedByMe. If the collection is not yours, it tries to subscribe the user to the collection after adding locally.

Please @javipacheco could you take a look? Thanks!

47degdev commented 7 years ago

Current coverage is 31.31% (diff: 61.11%)

Merging #1174 into master will decrease coverage by 0.82%

@@             master      #1174   diff @@
==========================================
  Files           422        425     +3   
  Lines         15206      15889   +683   
  Methods       14836      15486   +650   
  Messages          0          0          
  Branches        355        388    +33   
==========================================
+ Hits           4886       4975    +89   
- Misses        10320      10914   +594   
  Partials          0          0          

Powered by Codecov. Last update 1b0a78a...011bb82