File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/Files.App/ServicesImplementation Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 7
7
using System . Collections . Generic ;
8
8
using System . IO ;
9
9
using System . Linq ;
10
+ using System . Net . Http ;
10
11
using System . Threading . Tasks ;
11
12
using Windows . Services . Store ;
12
13
using WinRT . Interop ;
@@ -31,7 +32,20 @@ public bool IsReleaseNotesAvailable
31
32
32
33
public async Task DownloadReleaseNotes ( )
33
34
{
34
- ///
35
+ var applicationVersion = $ "{ SystemInformation . Instance . ApplicationVersion . Major } .{ SystemInformation . Instance . ApplicationVersion . Minor } .{ SystemInformation . Instance . ApplicationVersion . Build } ";
36
+ var releaseNotesLocation = string . Concat ( "https://raw.githubusercontent.com/files-community/Files/main/" , applicationVersion , ".md" ) ;
37
+
38
+ using ( var client = new HttpClient ( ) )
39
+ {
40
+ try
41
+ {
42
+ ReleaseNotes = await client . GetStringAsync ( releaseNotesLocation ) ;
43
+ }
44
+ catch { }
45
+ }
46
+
47
+ if ( ! string . IsNullOrWhiteSpace ( ReleaseNotes ) )
48
+ IsReleaseNotesAvailable = true ;
35
49
}
36
50
}
37
51
}
You can’t perform that action at this time.
0 commit comments