Skip to content

Commit 319f016

Browse files
committed
Remove unnessary list refresh
1 parent d8f3280 commit 319f016

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static class PluginsManifest
2121

2222
public static List<UserPlugin> UserPlugins { get; private set; }
2323

24-
public static async Task UpdateManifestAsync(CancellationToken token = default, bool usePrimaryUrlOnly = false)
24+
public static async Task<bool> UpdateManifestAsync(CancellationToken token = default, bool usePrimaryUrlOnly = false)
2525
{
2626
try
2727
{
@@ -36,6 +36,8 @@ public static async Task UpdateManifestAsync(CancellationToken token = default,
3636
{
3737
UserPlugins = results;
3838
lastFetchedAt = DateTime.Now;
39+
40+
return true;
3941
}
4042
}
4143
}
@@ -47,6 +49,8 @@ public static async Task UpdateManifestAsync(CancellationToken token = default,
4749
{
4850
manifestUpdateLock.Release();
4951
}
52+
53+
return false;
5054
}
5155
}
5256
}

Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ public partial class SettingsPanePluginStoreViewModel : BaseModel
2424
[RelayCommand]
2525
private async Task RefreshExternalPluginsAsync()
2626
{
27-
await PluginsManifest.UpdateManifestAsync();
28-
OnPropertyChanged(nameof(ExternalPlugins));
27+
if (await PluginsManifest.UpdateManifestAsync())
28+
{
29+
OnPropertyChanged(nameof(ExternalPlugins));
30+
}
2931
}
3032

3133
public bool SatisfiesFilter(PluginStoreItemViewModel plugin)

0 commit comments

Comments
 (0)