File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Flow.Launcher.Core/ExternalPlugins
Plugins/Flow.Launcher.Plugin.PluginsManager Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
- using Flow . Launcher . Infrastructure . Logger ;
2
- using Flow . Launcher . Plugin ;
3
- using System ;
1
+ using System ;
4
2
using System . Collections . Generic ;
5
3
using System . Threading ;
6
4
using System . Threading . Tasks ;
5
+ using CommunityToolkit . Mvvm . DependencyInjection ;
6
+ using Flow . Launcher . Plugin ;
7
7
8
8
namespace Flow . Launcher . Core . ExternalPlugins
9
9
{
@@ -18,11 +18,11 @@ public static class PluginsManifest
18
18
private static readonly SemaphoreSlim manifestUpdateLock = new ( 1 ) ;
19
19
20
20
private static DateTime lastFetchedAt = DateTime . MinValue ;
21
- private static TimeSpan fetchTimeout = TimeSpan . FromMinutes ( 2 ) ;
21
+ private static readonly TimeSpan fetchTimeout = TimeSpan . FromMinutes ( 2 ) ;
22
22
23
23
public static List < UserPlugin > UserPlugins { get ; private set ; }
24
24
25
- public static async Task < bool > UpdateManifestAsync ( CancellationToken token = default , bool usePrimaryUrlOnly = false )
25
+ public static async Task < bool > UpdateManifestAsync ( bool usePrimaryUrlOnly = false , CancellationToken token = default )
26
26
{
27
27
try
28
28
{
@@ -44,7 +44,7 @@ public static async Task<bool> UpdateManifestAsync(CancellationToken token = def
44
44
}
45
45
catch ( Exception e )
46
46
{
47
- Log . Exception ( $ "|PluginsManifest. { nameof ( UpdateManifestAsync ) } | Http request failed", e ) ;
47
+ Ioc . Default . GetRequiredService < IPublicAPI > ( ) . LogException ( nameof ( PluginsManifest ) , " Http request failed", e ) ;
48
48
}
49
49
finally
50
50
{
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ await Context.API.ShowProgressBoxAsync(prgBoxTitle,
236
236
internal async ValueTask < List < Result > > RequestUpdateAsync ( string search , CancellationToken token ,
237
237
bool usePrimaryUrlOnly = false )
238
238
{
239
- await PluginsManifest . UpdateManifestAsync ( token , usePrimaryUrlOnly ) ;
239
+ await PluginsManifest . UpdateManifestAsync ( usePrimaryUrlOnly , token ) ;
240
240
241
241
var pluginFromLocalPath = null as UserPlugin ;
242
242
var updateFromLocalPath = false ;
@@ -601,7 +601,7 @@ private bool InstallSourceKnown(string url)
601
601
internal async ValueTask < List < Result > > RequestInstallOrUpdateAsync ( string search , CancellationToken token ,
602
602
bool usePrimaryUrlOnly = false )
603
603
{
604
- await PluginsManifest . UpdateManifestAsync ( token , usePrimaryUrlOnly ) ;
604
+ await PluginsManifest . UpdateManifestAsync ( usePrimaryUrlOnly , token ) ;
605
605
606
606
if ( Uri . IsWellFormedUriString ( search , UriKind . Absolute )
607
607
&& search . Split ( '.' ) . Last ( ) == ZipSuffix )
You can’t perform that action at this time.
0 commit comments