codepath-android-fall16-group-8 / travel

3 stars 3 forks source link

do not extend ParseUser #58

Closed heyhuyen closed 7 years ago

heyhuyen commented 7 years ago

Since it's recommended to not extend the ParseUser model, I've converted the User model to a helper class with static methods for accessing the additional fields and relations.

Now we'll always handle ParseUser objects instead of User objects.

To access extra fields you can use the helper methods and pass in the ParseUser like this:

ParseUser pUser = ParseUser.getCurrentUser();
String profilePicUrl = User.getProfilePicUrl(pUser);

Also fixes the app crashing when trying to signup a new ParseUser.