File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -595,9 +595,9 @@ impl TeamCommand {
595595 }
596596
597597 if let Ok ( mut teams) = robotevents. teams ( query) . await {
598- // Sort by lowest program ID to prioritize VRC teams in the search
599- // NOTE: VRC Internally has an ID of 1, making it the lowest numeric program ID
600- teams. data . sort_by ( |a , b| a . program . id . cmp ( & b . program . id ) ) ;
598+ // Prioritize teams that are registered over teams that are not registered.
599+ // From there, pick the team with the lowest numeric program ID (VRC has the lowest ID being `1`).
600+ teams. data . sort_by_key ( |team| ( !team . registered , team . program . id ) ) ;
601601
602602 if let Some ( team) = teams. data . iter ( ) . next ( ) {
603603 self . team = Some ( team. clone ( ) ) ; // Cache value for later use.
You can’t perform that action at this time.
0 commit comments