MonocleGiraffe.Portable.Models.GalleryItem.DownVote C# (CSharp) Method

DownVote() public method

public DownVote ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task DownVote()
        {
            if (IsUpVoted)
            {
                IsUpVoted = false;
                Points--;
            }
            string toVote;
            if (IsDownVoted)
            {
                toVote = "veto";
                Points++;
            }
            else
            {
                if (IsUpVoted)
                    Points++;
                toVote = "down";
                Points--;
            }
            IsDownVoted = !IsDownVoted;
            await Gallery.Vote(Id, toVote);
        }