Skip to content

Commit

Permalink
Fix settings synchronization constantly picking up our package
Browse files Browse the repository at this point in the history
projectOpenCount is always incremented and saved, even though it's
not useful anymore after 10 opens. Skip saving it to avoid settings
synchronization from picking up changes.

Implements #499
  • Loading branch information
Gert-dev committed Mar 14, 2020
1 parent c2d0990 commit 6c3c1aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.2.1 (Unreleased)
* Update dependencies
* [Don't update settings every project open to avoid settings synchronization being triggered](https://github.com/Gert-dev/php-ide-serenata/issues/499)

## 5.2.0
* Update to [Serenata 5.2.0](https://gitlab.com/Serenata/Serenata/tags/5.2.0)

Expand Down
4 changes: 4 additions & 0 deletions lib/SerenataClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ class SerenataClient extends AutoLanguageClient

++projectOpens;

if (projectOpens > 10) {
return; // We've already shown the message, skip updating the property to not trigger settings sync.
}

this.container.getConfiguration().set('general.projectOpenCount', projectOpens);

// Only show this after a couple of project opens to avoid bothering the user when he is still setting up and
Expand Down

0 comments on commit 6c3c1aa

Please sign in to comment.