Skip to content

Commit

Permalink
manual check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wiegell committed Dec 8, 2022
1 parent 8969517 commit 3da1d09
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AstroWall/BusinessLayer/ApplicationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ private void disableUpdateOptions()

public async Task checkForNewPics()
{
// Cache latest
var tmp = db.Latest;

// Set state downloading
State.SetStateDownloading("Checking for new pics...");
Expand All @@ -236,6 +238,7 @@ public async Task checkForNewPics()
if (successfullOnlinCheck)
{


// Register successfull check in prefs
Prefs.LastOnlineCheck = DateTime.Now;

Expand All @@ -244,8 +247,12 @@ public async Task checkForNewPics()
await db.LoadImgs();

// Update submenu
log("Updating menu");
MenuHandler.PopulateSubmenuLatestPictures(db.getPresentableImages(), State);
State.UnsetStateDownloading();

// Run postProcess and set latest
if (db.Latest != null && !db.Latest.Equals(tmp)) await Wallpaper.RunPostProcessAndSetWallpaperAllScreens(db.Latest);
}

State.UnsetStateDownloading();
Expand Down

0 comments on commit 3da1d09

Please sign in to comment.