private void refreshReddit(int tempGenre)
{
if (!this.IsDisposed) this.Invoke((MethodInvoker) delegate { this.Invalidate(); });
if (server.Test())
{
BBResponse response;
if(tempGenre < genres.Length - 1)
response = server.SendRequest(new BBRequest(10, genres[tempGenre], null));
else
response = server.SendRequest(new BBRequest(10, null, currentUser.username));
if (response.responseType is BBResponse.SongList)
{
BBResponse.SongList songList = (BBResponse.SongList)response.responseType;
redditSongs[tempGenre] = songList.songs;
}
}
if(!this.IsDisposed) this.Invoke((MethodInvoker) delegate { this.Invalidate(); });
}