Skip to content

Commit

Permalink
Sort users, even though it looks weird when using two columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Mar 22, 2019
1 parent 70e7fc5 commit 39fa211
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/lobby/Lobby.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ export default {
let users = this.onlineUsers;
return Object.keys(users)
.filter(userName => !userName.startsWith("#AI"))
.map(key => users[key]);
.map(key => users[key])
.sort((user1, user2) => user1.rating - user2.rating);
},
onlineAIs() {
let users = this.onlineUsers;
return Object.keys(users)
.filter(userName => userName.startsWith("#AI"))
.map(key => users[key]);
.map(key => users[key])
.sort((user1, user2) => user1.rating - user2.rating);
},
...mapState("games", ["incompleteGames"]),
...mapGetters("games", ["activeGame"]),
Expand Down

0 comments on commit 39fa211

Please sign in to comment.