/// <summary> /// Populate the grid from installed apps /// </summary> /// <returns></returns> private async Task PopulateAsync(bool isRenameMode = false) { // Load configuration var config = ConfigPersistence.LoadConfig(); // Set skybox if (!isRenameMode) { this.skyboxHandler.SetSkybox(config.background); } // Process apps in background var apps = await Task.Run(() => { AndroidJNI.AttachCurrentThread(); try { return(AppProcessor.ProcessApps(config, isRenameMode)); } finally { AndroidJNI.DetachCurrentThread(); } }); // Download updates in the background if (!isRenameMode && config.autoUpdate && !GlobalState.Instance.CheckedForUpdate) { GlobalState.Instance.CheckedForUpdate = true; AssetsDownloader.DownloadAssetsAsync(config, this.downloadStatusIndicator); } // Populate the panel content if (!isRenameMode) { await PopulatePanelContentAsync(config, apps); } else { await PopulateRenamePanelContentAsync(config, apps); } }
public void UpdateAssetsNow() { AssetsDownloader.DownloadAssetsAsync(config, this.downloadStatusIndicator, true); }