File tree Expand file tree Collapse file tree
osu.Game/Screens/OnlinePlay/Matchmaking/Queue Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66using osu . Framework . Audio ;
77using osu . Framework . Audio . Sample ;
88using osu . Framework . Bindables ;
9- using osu . Framework . Extensions ;
109using osu . Framework . Extensions . ObjectExtensions ;
1110using osu . Framework . Graphics ;
1211using osu . Framework . Graphics . Colour ;
@@ -186,11 +185,17 @@ private void onMatchmakingRoomInvited(MatchmakingRoomInvitationParams invitation
186185
187186 private void onMatchmakingDuelIssued ( MatchmakingDuelIssuedParams duel )
188187 {
189- users . GetUserAsync ( duel . UserId )
190- . ContinueWith ( u => Scheduler . Add ( ( ) =>
191- {
192- notifications ? . Post ( new DuelNotification ( this , u . GetResultSafely ( ) ! , duel ) ) ;
193- } ) , TaskContinuationOptions . OnlyOnRanToCompletion ) ;
188+ handleDuelRequestAsync ( ) . FireAndForget ( ) ;
189+
190+ async Task handleDuelRequestAsync ( )
191+ {
192+ APIUser ? user = await users . GetUserAsync ( duel . UserId ) . ConfigureAwait ( false ) ;
193+
194+ if ( user == null )
195+ return ;
196+
197+ Scheduler . Add ( ( ) => notifications ? . Post ( new DuelNotification ( this , user , duel ) ) ) ;
198+ }
194199 }
195200
196201 private void onMatchmakingRoomReady ( long roomId , string password ) => Scheduler . Add ( ( ) =>
You can’t perform that action at this time.
0 commit comments