fix(engine): differentiate leaderboard opt-in vs opt-out error toasts (M-12)
The same "Leaderboard update failed" message was shown for both join and leave failures, leaving the player unable to tell which operation failed. Now shows "Failed to join leaderboard" or "Failed to leave leaderboard" with specific wording that matches the player's intent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -375,7 +375,7 @@ fn poll_opt_in_task(
|
|||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!("leaderboard opt-in failed: {e}");
|
warn!("leaderboard opt-in failed: {e}");
|
||||||
toast.write(InfoToastEvent("Leaderboard update failed".to_string()));
|
toast.write(InfoToastEvent("Failed to join leaderboard".to_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -415,7 +415,7 @@ fn poll_opt_out_task(
|
|||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!("leaderboard opt-out failed: {e}");
|
warn!("leaderboard opt-out failed: {e}");
|
||||||
toast.write(InfoToastEvent("Leaderboard update failed".to_string()));
|
toast.write(InfoToastEvent("Failed to leave leaderboard".to_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user