File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Image2Display/Image2Display Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 229229 <system : String x : Key =" Copied" >Copied!</system : String >
230230 <system : String x : Key =" Error" >Error</system : String >
231231 <system : String x : Key =" CheckUpdateFail" >Check update failed.</system : String >
232+ <system : String x : Key =" Notify" >Notify</system : String >
233+ <system : String x : Key =" NoUpdate" >This is the latest version.</system : String >
232234</ResourceDictionary >
Original file line number Diff line number Diff line change 234234 <system : String x : Key =" Copied" >已复制!</system : String >
235235 <system : String x : Key =" Error" >错误</system : String >
236236 <system : String x : Key =" CheckUpdateFail" >更新检查失败,请确保网络连接正常</system : String >
237+ <system : String x : Key =" Notify" >提示</system : String >
238+ <system : String x : Key =" NoUpdate" >当前已是最新版本。</system : String >
237239</ResourceDictionary >
Original file line number Diff line number Diff line change 1010 <Authors >chenxuuu</Authors >
1111 <Company >https://github.com/chenxuuu/image2display</Company >
1212 <Description >Image data conversion tool</Description >
13- <Version >1.1.6.4 </Version >
13+ <Version >1.1.6.5 </Version >
1414 <Platforms >AnyCPU;ARM32;ARM64;x64;x86</Platforms >
1515 </PropertyGroup >
1616
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ private async Task CheckUpdate()
9191 HttpClient client = new HttpClient ( ) ;
9292 client . DefaultRequestHeaders . Add ( "user-agent" , "Image2Display" ) ;
9393 string data = await client . GetStringAsync ( "https://api.github.com/repos/chenxuuu/Image2Display/releases/latest" ) ;
94- var jo = JsonSerializer . Deserialize < JsonObject > ( data ) ;
94+ var jo = JsonNode . Parse ( data ) ? . AsObject ( ) ;
9595 var ver = ( string ) jo ! [ "tag_name" ] ! ;
9696
9797 var vLocal = Utils . Version . Split ( '.' ) ;
@@ -112,6 +112,12 @@ private async Task CheckUpdate()
112112 NewVersion = ver ;
113113 HasNewVersion = true ;
114114 }
115+ else
116+ {
117+ await DialogHelper . ShowNotifyDialog ( Utils . GetI18n < string > ( "Notify" ) ,
118+ $ "{ Utils . GetI18n < string > ( "NoUpdate" ) } ",
119+ Symbol . Emoji ) ;
120+ }
115121 }
116122 catch ( Exception ex )
117123 {
You can’t perform that action at this time.
0 commit comments