Skip to content

Extract DatabaseItem.refresh method to DatabaseManager#2450

Merged
koesie10 merged 2 commits intomainfrom
koesie10/move-database-item-refresh
May 25, 2023
Merged

Extract DatabaseItem.refresh method to DatabaseManager#2450
koesie10 merged 2 commits intomainfrom
koesie10/move-database-item-refresh

Conversation

@koesie10
Copy link
Copy Markdown
Member

This moves the DatabaseItem.refresh method out of the DatabaseItem interface and moves it to the DatabaseManager itself. This makes the DatabaseItem interface smaller and ensures that the refresh method is not called outside of the DatabaseManager.

It's easiest to review this commit-by-commit.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

This will allow us to implement specific behavior on the
`DatabaseItemImpl` which is not available on the `DatabaseItem`. This
will allow us to make the surface area of the `DatabaseItem` smaller.
This moves the `refresh` method from `DatabaseItem` to `DatabaseManager`
and makes it private. This makes the `DatabaseItem` interface smaller
and more focused and ensures that `refresh` cannot be called from
outside of the `DatabaseManager`.
@koesie10 koesie10 force-pushed the koesie10/move-database-item-refresh branch from 809ed71 to 09fc0f3 Compare May 25, 2023 13:03
@koesie10 koesie10 marked this pull request as ready for review May 25, 2023 13:33
@koesie10 koesie10 requested review from a team as code owners May 25, 2023 13:33
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

Nice bit of refactoring there! Looks good.

@koesie10 koesie10 enabled auto-merge May 25, 2023 13:55
@koesie10 koesie10 merged commit 7bbba38 into main May 25, 2023
@koesie10 koesie10 deleted the koesie10/move-database-item-refresh branch May 25, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants