Skip to content

Conversation

@DavidCramer
Copy link
Contributor

@pereirinha - the metadata on whats saved (pending, syncing etc) may be outdated. If there is no sync-type needed due to the signature being in sync and up to date, don't show meta data notices, since it's no longer relevant.

public function filter_status( $status, $attachment_id ) {

if ( $this->been_synced( $attachment_id ) || $this->is_pending( $attachment_id ) ) {
if ( $this->been_synced( $attachment_id ) && $this->is_pending( $attachment_id ) && $this->get_sync_type( $attachment_id ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Calling get_sync_type outside the if may be a better idea to avoid calling the same function multiple times

Copy link
Contributor Author

@DavidCramer DavidCramer Aug 11, 2020

Choose a reason for hiding this comment

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

@dugajean - a good observation, but at this point, the get_sync_type will be using the cached version (the cache flag is not set to false), meaning it will be run once on the page load. So it should represent the state at time of load.

@pereirinha pereirinha merged commit 6c849d2 into feature/revise-sync-meta Aug 11, 2020
@pereirinha pereirinha deleted the feature/status-on-type-only branch August 11, 2020 15:40
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.

4 participants