@@ -122,7 +122,7 @@ public async void SaveEditAppInfo()
122122 #region 自定义图片保存
123123 //var mostRecentUser = ISteamService.Instance.GetRememberUserList().Where(s => s.MostRecent).FirstOrDefault();
124124 var mostRecentUser = SteamConnectService . Current . SteamUsers . Items . Where ( s => s . MostRecent ) . FirstOrDefault ( ) ;
125- if ( ! ( App . EditHeaderLogoStream is FileStream fs3 && fs3 . Name == ( await App . HeaderLogoStream ) ? . Name ) )
125+ if ( ! ( App . EditHeaderLogoStream is FileStream fs3 && ( await App . HeaderLogoStream ) is FileStream headerLogoStream && fs3 . Name == headerLogoStream . Name ) )
126126 {
127127 if ( ! CheckCurrentSteamUserStats ( mostRecentUser ) )
128128 return ;
@@ -135,7 +135,7 @@ public async void SaveEditAppInfo()
135135 else
136136 this . RaisePropertyChanged ( nameof ( App . HeaderLogoStream ) ) ;
137137 }
138- if ( ! ( App . EditLibraryLogoStream is FileStream fs && fs . Name == ( await App . LibraryLogoStream ) ? . Name ) )
138+ if ( ! ( App . EditLibraryLogoStream is FileStream fs && ( await App . LibraryLogoStream ) is FileStream libraryLogoStream && fs . Name == libraryLogoStream . Name ) )
139139 {
140140 if ( ! CheckCurrentSteamUserStats ( mostRecentUser ) )
141141 return ;
@@ -148,7 +148,7 @@ public async void SaveEditAppInfo()
148148 else
149149 this . RaisePropertyChanged ( nameof ( App . LibraryLogoStream ) ) ;
150150 }
151- if ( ! ( App . EditLibraryHeroStream is FileStream fs1 && fs1 . Name == ( await App . LibraryHeroStream ) ? . Name ) )
151+ if ( ! ( App . EditLibraryHeroStream is FileStream fs1 && ( await App . LibraryHeroStream ) is FileStream libraryHeroStream && fs1 . Name == libraryHeroStream . Name ) )
152152 {
153153 if ( ! CheckCurrentSteamUserStats ( mostRecentUser ) )
154154 return ;
@@ -161,7 +161,7 @@ public async void SaveEditAppInfo()
161161 else
162162 this . RaisePropertyChanged ( nameof ( App . LibraryHeroStream ) ) ;
163163 }
164- if ( ! ( App . EditLibraryGridStream is FileStream fs2 && fs2 . Name == ( await App . LibraryGridStream ) ? . Name ) )
164+ if ( ! ( App . EditLibraryGridStream is FileStream fs2 && ( await App . LibraryGridStream ) is FileStream libraryGridStream && fs2 . Name == libraryGridStream . Name ) )
165165 {
166166 if ( ! CheckCurrentSteamUserStats ( mostRecentUser ) )
167167 return ;
@@ -246,16 +246,16 @@ public async void ApplyCustomImageToApp(SteamGridItemType type)
246246 switch ( type )
247247 {
248248 case SteamGridItemType . Header :
249- App . EditHeaderLogoStream = ( await App . HeaderLogoStream ) ? . Stream ;
249+ App . EditHeaderLogoStream = ( await App . HeaderLogoStream ) ;
250250 break ;
251251 case SteamGridItemType . Grid :
252- App . EditLibraryGridStream = ( await App . LibraryGridStream ) ? . Stream ;
252+ App . EditLibraryGridStream = ( await App . LibraryGridStream ) ;
253253 break ;
254254 case SteamGridItemType . Hero :
255- App . EditLibraryHeroStream = ( await App . LibraryHeroStream ) ? . Stream ;
255+ App . EditLibraryHeroStream = ( await App . LibraryHeroStream ) ;
256256 break ;
257257 case SteamGridItemType . Logo :
258- App . EditLibraryLogoStream = ( await App . LibraryLogoStream ) ? . Stream ;
258+ App . EditLibraryLogoStream = ( await App . LibraryLogoStream ) ;
259259 break ;
260260 }
261261 return ;
0 commit comments