Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Fix favorite bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammy Sammon committed Feb 5, 2018
1 parent b5f7e77 commit 455bfc4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public MainForm()
notifyIcon1.ContextMenu = contextMenu2;
notifyIcon1.Icon = Properties.Resources.icon;

LoadFavSprite(heartFav);
Task.Run(async () => await LoadFavSprite(heartFav)).Wait();

if (Settings.Get<bool>(Setting.ThumbnailButton))
{
Expand Down Expand Up @@ -207,7 +207,7 @@ public MainForm()
UpdatePanelExcludedRegions();
}

private async void LoadFavSprite(bool heart)
private async Task LoadFavSprite(bool heart)
{
await Task.Run(() =>
{
Expand Down Expand Up @@ -737,6 +737,13 @@ private void centerPanel_Resize(object sender, EventArgs e)

private async void SetFavouriteSprite(bool favourited)
{
await Task.Run(() =>
{
while (favSprite == null)
{

}
});
picFavourite.Visible = true;
if (favourited)
{
Expand Down

0 comments on commit 455bfc4

Please sign in to comment.