예제 #1
0
    // 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();
    }
예제 #2
0
    // 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();
        }
    }