File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -554,9 +554,12 @@ public static void Init()
554
554
var json1 = JsonHelper . Serialize ( Common . ApplicationListCache ) ;
555
555
FileHelper . WriteFile ( ConvertJsonString ( json1 ) , Common . TemporaryApplicationJson ) ;
556
556
}
557
- var jsonLocal = FileHelper . ReadFile ( LocalTemporaryApplicationJson ) ;
558
- var applicationsLocal = JsonHelper . Deserialize < ObservableCollection < ApplicationModel > > ( jsonLocal ) ;
559
- Common . ApplicationListCache . AddRange ( applicationsLocal ) ;
557
+ if ( File . Exists ( LocalTemporaryApplicationJson ) )
558
+ {
559
+ var jsonLocal = FileHelper . ReadFile ( LocalTemporaryApplicationJson ) ;
560
+ var applicationsLocal = JsonHelper . Deserialize < ObservableCollection < ApplicationModel > > ( jsonLocal ) ;
561
+ Common . ApplicationListCache . AddRange ( applicationsLocal ) ;
562
+ }
560
563
Common . ApplicationListCache = new ObservableCollection < ApplicationModel > ( Common . ApplicationListCache . OrderBy ( x => x . Group ) ) ;
561
564
562
565
}
You can’t perform that action at this time.
0 commit comments