Skip to content

Commit

Permalink
web app: Fix bugs in Channel Restore Data
Browse files Browse the repository at this point in the history
Two bugs fixed:
- List of sources only contains 1 item
- CLicking "Restore Data" too quickly after page loads gives an empty
  source list.
  • Loading branch information
bennettpeter committed Apr 3, 2024
1 parent 2e46578 commit 397533f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -29,7 +29,7 @@ <h2>{{ 'settings.chanedit.title' | translate }}</h2>
</p-button>
<p-button icon="pi pi-history" (onClick)="restoreDataRequest()"
pTooltip="Restore Icons, Visible status, and XMLTV Id after a new scan." tooltipPosition="top"
label="Restore Data" styleClass="p-button-success" class="p-2">
label="Restore Data" styleClass="p-button-success" class="p-2" [disabled]="videoSources.length == 0">
</p-button>
<div *ngIf="setupService.pageType != 'S' " class="p-2">
{{ 'settings.chanedit.delete_message' | translate }}
Expand Down
Expand Up @@ -411,7 +411,7 @@ export class ChannelEditorComponent implements OnInit {
this.resSearchDone = false;
this.allChannels.forEach((entry) => {
if (entry.MplexId) {
if (!this.resSources.find((x) => x.Id = entry.SourceId)) {
if (!this.resSources.find((x) => x.Id == entry.SourceId)) {
const sourceEntry = this.videoSources.find((x1) => x1.Id == entry.SourceId);
if (sourceEntry)
this.resSources.push(sourceEntry);
Expand Down

0 comments on commit 397533f

Please sign in to comment.