// When button click send the like or dislike request public void updateCurPosterFavourite(bool isFavor) { Favourite favourite = new Favourite(); favourite.userid = storeLoginSessionId.loginId; favourite.targetid = targetid; if (isFavor) { favourite.Dislike(); } else { favourite.Like(); } changeIcon(); }
// When button click send the like or dislike request public void updateCurPosterFavourite() { bool hasPoster = !(string.IsNullOrEmpty(keyId.text)); if (hasPoster) { Favourite favourite = new Favourite(); favourite.userid = storeLoginSessionId.loginId; favourite.targetid = keyId.text; if (isFavor) { favourite.Dislike(); } else { favourite.Like(); } changeText(); } }