Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ export class HashlistsTableComponent extends BaseTableComponent implements OnIni

setIsArchived(isArchived: boolean): void {
this.isArchived = isArchived;
this.dataSource.reset(true);
this.dataSource.setIsArchived(isArchived);
this.dataSource.loadAll();
}
Comment on lines +239 to 240
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sequence of operations calls reset(true), then setIsArchived(), then loadAll(). This pattern may cause two requests: one from reset(true) (if it triggers a load) and another from loadAll(). Consider whether setIsArchived() should handle the reset and load internally, or verify that reset(true) doesn't trigger a load to avoid the duplicate request issue this PR aims to fix.

Suggested change
this.dataSource.loadAll();
}
}
}

Copilot uses AI. Check for mistakes.

private renderCrackedStatusIcon(hashlist: JHashlist): HTTableIcon {
Expand Down
1 change: 0 additions & 1 deletion src/app/hashlists/hashlist/hashlist.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ export class HashlistComponent {
toggleIsArchived(event: MatSlideToggleChange): void {
this.table.setIsArchived(event.checked);
this.pageTitle = event.checked ? 'Hashlists (archived)' : 'Hashlists';
this.table.reload();
}
}
1 change: 0 additions & 1 deletion src/app/tasks/show-tasks/show-tasks.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ export class ShowTasksComponent {
toggleIsArchived(event: MatSlideToggleChange): void {
this.table.setIsArchived(event.checked);
this.pageTitle = event.checked ? 'Tasks (archived)' : 'Tasks';
this.table.reload();
}
}