M client/src/plugins/async_tasks/req_game_forming.rs => client/src/plugins/async_tasks/req_game_forming.rs +4 -1
@@ 30,8 30,11 @@ async_task_start_call!(GameFormingCallEvent, GameFormingCall, |_ev, no| {
async_task_handle_call!(GameFormingCall, |response, menu_data| {
match response {
Err(_err) => panic!("forming games failed, handle me"),
- Ok(resp) => {
+ Ok(mut resp) => {
menu_data.waiting = false;
+
+ resp.sort_by_key(|g| g.created_at.clone());
+
menu_data.forming_games = resp;
}
}
M client/src/plugins/async_tasks/req_game_mygames.rs => client/src/plugins/async_tasks/req_game_mygames.rs +4 -1
@@ 30,8 30,11 @@ async_task_start_call!(GameMyGamesCallEvent, GameMyGamesCall, |_ev, no| {
async_task_handle_call!(GameMyGamesCall, |response, menu_data| {
match response {
Err(_err) => panic!("my games failed, handle me"),
- Ok(resp) => {
+ Ok(mut resp) => {
menu_data.waiting = false;
+
+ resp.sort_by_key(|g| g.created_at.clone());
+
menu_data.my_games = resp;
}
}