Skip to content

Commit

Permalink
Allow caching of recording thumbnails #1980 - remove duplicated netwo…
Browse files Browse the repository at this point in the history
…rk calls
  • Loading branch information
HarelM committed Apr 2, 2024
1 parent ca4e1f2 commit 5065f41
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="flex flex-row">
<button class="w-full" mat-raised-button color="primary" matDialogClose (click)="createShare()" angulartics2On="click" angularticsCategory="Share" angularticsAction="Create share from shares dialog"><i class="fa icon-plus fa-lg"></i> {{resources.createShare}}</button>
</div>
<div *ngFor="let shareUrl of filteredShareUrls" class="item">
<div *ngFor="let shareUrl of filteredShareUrls; trackBy:trackById" class="item">
<div [ngClass]="{'active': selectedShareUrlId === shareUrl.id}" (click)="toggleSelectedShareUrl(shareUrl)">
<div class="flex flex-row" *ngIf="!isShareUrlInEditMode(shareUrl.id)">
<div class="item-image">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,8 @@ export class SharesDialogComponent extends BaseMapComponent implements OnInit, O
public getShareSocialLinks() {
return this.shareUrlsService.getShareSocialLinks(this.getSelectedShareUrl());
}

public trackById(_: number, shareUrl: ShareUrl) {
return shareUrl.id;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<input type="file" (change)="uploadToOsm($event)" [style.display]="'none'" />
</label>
</div>
<div *ngFor="let trace of filteredTraces" class="item">
<div *ngFor="let trace of filteredTraces; trackBy:trackById" class="item">
<div [ngClass]="{'active': selectedTraceId === trace.id}" (click)="toggleSelectedTrace(trace)">
<div class="flex flex-row" *ngIf="!isTraceInEditMode(trace.id)">
<div class="item-image">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,8 @@ export class TracesDialogComponent extends BaseMapComponent implements OnInit, O
throw new Error(`invalid visibility value: ${visibility}`);
}
}

public trackById(_: number, trace: Trace) {
return trace.id;
}
}

0 comments on commit 5065f41

Please sign in to comment.