Ensure that systems are sorted by system number

This commit is contained in:
Chrystian Huot 2019-06-12 13:06:18 -04:00
parent 7c2ee69151
commit 1fb4be6755

View file

@ -428,7 +428,11 @@ export class AppRadioService implements OnDestroy {
.subscribe()); .subscribe());
this._subscriptions.systems.push(RadioSystems this._subscriptions.systems.push(RadioSystems
.find() .find({}, {
sort: {
system: 1,
},
})
.pipe(debounceTime(100)) .pipe(debounceTime(100))
.subscribe((systems: RadioSystem[]) => { .subscribe((systems: RadioSystem[]) => {
this._systems.splice(0, this._systems.length, ...systems); this._systems.splice(0, this._systems.length, ...systems);