Skip to content

Commit

Permalink
Forgot to return value
Browse files Browse the repository at this point in the history
  • Loading branch information
lay295 committed Feb 18, 2020
1 parent 7f8e283 commit e9c96ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TwitchDownloaderWPF/PageChatRender.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ private void BackgroundRenderManager_DoWork(object sender, DoWorkEventArgs e)
string userName = comment.commenter.display_name.ToString();
int default_x = 2;
Point drawPos = new Point(default_x, 0);
string colorHtml = (comment.message.user_color != null ? comment.message.user_color : defaultColors[rand.Next(0, defaultColors.Length)]).Substring(1);
SKColor userColor = new SKColor(Convert.ToByte(colorHtml.Substring(0, 2), 16), Convert.ToByte(colorHtml.Substring(2, 2), 16), Convert.ToByte(colorHtml.Substring(4, 2), 16));
string colorHtml = (comment.message.user_color != null ? comment.message.user_color : defaultColors[rand.Next(0, defaultColors.Length)]);
SKColor userColor = SKColor.Parse(colorHtml);
userColor = GenerateUserColor(userColor, renderOptions.background_color);

List<SKBitmap> imageList = new List<SKBitmap>();
Expand Down Expand Up @@ -239,6 +239,7 @@ private SKColor GenerateUserColor(SKColor userColor, SKColor background_color)
if (userColor.Red == 0 && userColor.Green == 0 && userColor.Blue == 0)
{
SKColor newColor = SKColor.Parse("#858585");
return newColor;
}

return userColor;
Expand Down

0 comments on commit e9c96ad

Please sign in to comment.