Skip to content

Commit

Permalink
#39 - fix shuffle after Nativescript update
Browse files Browse the repository at this point in the history
  • Loading branch information
kylanee committed Aug 2, 2022
1 parent 8502299 commit d527790
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/pages/sponsor/event-detail/event-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,14 @@ export class SponsorEventDetailComponent implements OnInit, OnDestroy {
shuffleArray<T>(array: ObservableArray<T>): void {
for (let i = array.length - 1; i > 0; i--) {
let j = Math.floor(Math.random() * (i + 1));
let temp = array[i];
array[i] = array[j];
array[j] = temp;
let temp = array.getItem(i);
array.setItem(i, array.getItem(j));
array.setItem(j, temp);
}
}

shuffle(): void {
// FIXME restore
// const array = this.scans.slice();
this.shuffleArray(this.scans);
// this.scans = new ObservableArray<SponsorScan>(array);
}

sendByEmail(): void {
Expand Down

0 comments on commit d527790

Please sign in to comment.