Skip to content

Fix active providers not reloading after settings changes#3

Open
AlexMattyou wants to merge 1 commit into
top:mainfrom
AlexMattyou:main
Open

Fix active providers not reloading after settings changes#3
AlexMattyou wants to merge 1 commit into
top:mainfrom
AlexMattyou:main

Conversation

@AlexMattyou

Copy link
Copy Markdown

While configuring S3 backups, I noticed that changing the Path Prefix setting had no effect. Backups continued to be uploaded to the original location even after saving the new configuration.

After investigating, I found that settings were being saved correctly by Logseq, but active providers were not being refreshed with the updated configuration. Existing S3/WebDAV provider instances continued using stale settings until Logseq was restarted or the provider was disabled and re-enabled.

Changes:

  • Reinitialize active providers when settings change in BackupService
  • Recreate and reinitialize active providers when settings change in SyncService
  • Updated log messages to reflect provider updates as well as initialization

Result:

Configuration changes such as Path Prefix, credentials, and other provider settings are now applied immediately without requiring a Logseq restart or provider toggle.

And, thanks man. This was the only and only plugin I found to sync the Logseq with my s3. With this simple fix I hope the flow can be seemless! 🫡

@AlexMattyou

Copy link
Copy Markdown
Author

And, if you do need to optimise the call onSettingsChanged again, we might need a complex if condition. For now these 2 conditions are not needed as users will only change settings rarely!

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.

1 participant