Remove unnessary list refresh

This commit is contained in:
Jack251970 2025-02-10 12:01:21 +08:00
parent d8f3280632
commit 319f016ced
2 changed files with 9 additions and 3 deletions

View file

@ -21,7 +21,7 @@ namespace Flow.Launcher.Core.ExternalPlugins
public static List<UserPlugin> UserPlugins { get; private set; }
public static async Task UpdateManifestAsync(CancellationToken token = default, bool usePrimaryUrlOnly = false)
public static async Task<bool> UpdateManifestAsync(CancellationToken token = default, bool usePrimaryUrlOnly = false)
{
try
{
@ -36,6 +36,8 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
UserPlugins = results;
lastFetchedAt = DateTime.Now;
return true;
}
}
}
@ -47,6 +49,8 @@ namespace Flow.Launcher.Core.ExternalPlugins
{
manifestUpdateLock.Release();
}
return false;
}
}
}

View file

@ -24,8 +24,10 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
[RelayCommand]
private async Task RefreshExternalPluginsAsync()
{
await PluginsManifest.UpdateManifestAsync();
OnPropertyChanged(nameof(ExternalPlugins));
if (await PluginsManifest.UpdateManifestAsync())
{
OnPropertyChanged(nameof(ExternalPlugins));
}
}
public bool SatisfiesFilter(PluginStoreItemViewModel plugin)