DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

73a5e4a574c8fd6e42db826a8f07db08296b4beb — Jonni Liljamo 1 year, 7 months ago 3c5b97e
feat(client): sort games based on created_at
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;
        }
    }