app/src/main/java/com/mott/eric/fbuinstagram/fragments/DetailsFragment.java
public void addLike(boolean isAdd){
        likes = post.getLikes();
        int newLike = Integer.valueOf(likes);

        if(isAdd){
            newLike++;
        }
        else{
            newLike--;
        }

        likes = String.valueOf(newLike);
        post.setLikes(likes);
        post.saveInBackground();
        tvLikes.setText(String.valueOf(newLike));
    }
//Send true to add a like, false to subtract a like
Send true to add a like, false to subtract a like
Send true to add a like false to subtract a like
public void addLike(boolean isAdd){
        likes = post.getLikes();
        int newLike = Integer.valueOf(likes);
        if(isAdd){
            newLike++;
        }
        else{
            newLike--;
        }
        likes = String.valueOf(newLike);
        post.setLikes(likes);
        post.saveInBackground();
        tvLikes.setText(String.valueOf(newLike));
    }
public void addLike ( boolean isAdd ) { likes = post . getLikes ( ) ; int newLike = Integer . valueOf ( likes ) ; if ( isAdd ) { newLike ++ ; } else { newLike -- ; } likes = String . valueOf ( newLike ) ; post . setLikes ( likes ) ; post . saveInBackground ( ) ; tvLikes . setText ( String . valueOf ( newLike ) ) ; }
Send true to add a like, false to subtract a like
Send true to add a like false to subtract a like