File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Flow.Launcher.Core/ExternalPlugins Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . Net ;
6
6
using System . Net . Http ;
7
- using System . Text . Json ;
7
+ using System . Net . Http . Json ;
8
8
using System . Threading ;
9
9
using System . Threading . Tasks ;
10
10
@@ -36,9 +36,7 @@ public async Task<List<UserPlugin>> FetchAsync(CancellationToken token)
36
36
37
37
if ( response . StatusCode == HttpStatusCode . OK )
38
38
{
39
- await using var json = await response . Content . ReadAsStreamAsync ( token ) . ConfigureAwait ( false ) ;
40
-
41
- this . plugins = await JsonSerializer . DeserializeAsync < List < UserPlugin > > ( json , cancellationToken : token ) . ConfigureAwait ( false ) ;
39
+ this . plugins = await response . Content . ReadFromJsonAsync < List < UserPlugin > > ( cancellationToken : token ) . ConfigureAwait ( false ) ;
42
40
this . latestEtag = response . Headers . ETag . Tag ;
43
41
44
42
Log . Info ( nameof ( CommunityPluginSource ) , $ "Loaded { this . plugins . Count } plugins from { ManifestFileUrl } ") ;
You can’t perform that action at this time.
0 commit comments