File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,22 @@ pub fn run_game_session(cli: Cli) -> Result<()> {
99 log:: info!( "Starting GitType game session" ) ;
1010
1111 // Check for updates before starting the game session
12- tokio:: task:: block_in_place ( || {
12+ let should_exit = tokio:: task:: block_in_place ( || {
1313 tokio:: runtime:: Handle :: current ( ) . block_on ( async {
1414 if let Ok ( Some ( entry) ) = crate :: version:: VersionChecker :: check_for_updates ( ) . await {
1515 if entry. update_available {
16- let _ = crate :: version:: VersionChecker :: display_update_notification ( & entry) ;
16+ return crate :: version:: VersionChecker :: display_update_notification ( & entry)
17+ . map ( |should_continue| !should_continue) ;
1718 }
1819 }
20+ Ok ( false )
1921 } )
20- } ) ;
22+ } ) ?;
23+
24+ if should_exit {
25+ log:: info!( "User exited after update notification" ) ;
26+ return Ok ( ( ) ) ;
27+ }
2128
2229 // Session repository will be initialized in DatabaseInitStep during loading screen
2330
You can’t perform that action at this time.
0 commit comments