Skip to content

Conversation

@jessevz
Copy link
Contributor

@jessevz jessevz commented Oct 22, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where toggling the archive filter caused duplicate requests to be sent. The fix removes redundant reload() calls and consolidates the data loading logic into the table component's setIsArchived() method.

  • Removed duplicate this.table.reload() calls from parent components
  • Added proper data source reset and load sequence in the table component's setIsArchived() method

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/app/tasks/show-tasks/show-tasks.component.ts Removed redundant reload() call after setting archive filter
src/app/hashlists/hashlist/hashlist.component.ts Removed redundant reload() call after setting archive filter
src/app/core/_components/tables/hashlists-table/hashlists-table.component.ts Added data source reset and loadAll() calls to properly handle archive filter changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +239 to 240
this.dataSource.loadAll();
}
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.
@gluafamichl gluafamichl merged commit e6f7943 into master Oct 23, 2025
3 checks passed
@gluafamichl gluafamichl deleted the fix-archive branch October 23, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants