private void OnFollowId() { if (string.IsNullOrEmpty(TargetId)) { return; } bool followResult = false; if (m_isFollowingId) { followResult = TargetIdType == AccountType.Artist ? SpotifyService.UnfollowArtists(TargetId) : SpotifyService.UnfollowUsers(TargetId); } else { followResult = TargetIdType == AccountType.Artist ? SpotifyService.FollowArtists(TargetId) : SpotifyService.FollowUsers(TargetId); } m_isFollowingId = !m_isFollowingId; m_followBtn.GetComponentInChildren <Text>().text = m_isFollowingId ? "Unfollow" : "Follow"; if (!followResult) { Analysis.LogError("Not able to follow/unfollow the id", Analysis.LogLevel.All); } }