From 6c3c1aaa669cdf99927715867ebe18fd056f76d8 Mon Sep 17 00:00:00 2001 From: Gert Date: Sat, 14 Mar 2020 14:51:00 +0100 Subject: [PATCH] Fix settings synchronization constantly picking up our package 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 --- CHANGELOG.md | 4 ++++ lib/SerenataClient.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb7bcb1b..f014b75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/lib/SerenataClient.js b/lib/SerenataClient.js index c8749465..5995a119 100644 --- a/lib/SerenataClient.js +++ b/lib/SerenataClient.js @@ -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