Skip to content

Commit

Permalink
Allow user to save search result movies to favorites
Browse files Browse the repository at this point in the history
  • Loading branch information
maksim-m committed Sep 30, 2016
1 parent 77954f0 commit e8df004
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public FavoritesService(Context context) {
}

public void addToFavorites(Movie movie) {
context.getContentResolver().insert(MoviesContract.MovieEntry.CONTENT_URI, movie.toContentValues());
ContentValues contentValues = new ContentValues();
contentValues.put(MoviesContract.COLUMN_MOVIE_ID_KEY, movie.getId());
context.getContentResolver().insert(MoviesContract.Favorites.CONTENT_URI, contentValues);
Expand Down

0 comments on commit e8df004

Please sign in to comment.