Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Refactor ConfigXml #135

Merged
merged 76 commits into from
Dec 22, 2018
Merged

WIP - Refactor ConfigXml #135

merged 76 commits into from
Dec 22, 2018

Conversation

Catfriend1
Copy link
Owner

@Catfriend1 Catfriend1 commented Dec 1, 2018

Purpose
Refactor ConfigXml to make future enhancemens that were long "on hold" possible.

Related issues
#101 "Use default folder path given in config.xml"
#108 "IllegalStateException: Fragment already added"
#110 "Enhancement request for per-folder(device) sync conditions"
#141 "NPE crash after key and config regeneration"
#143 "Adjust the folder icon to show if it's send/receive or both"
#144 "CPU percentage is not shown on the status tab"
#145 "Always make individual sync conditions UI available"
#146 "IntroducedBy deviceID lost on config change through wrapper UI"
#147 "Wrapper doesn't use the same syntax as syncthing core's web UI for device addresses"
#148 "Syncthing wrapper "emergency" shutdown on native binary crash doesn't work"

Testing
Completed.

@Catfriend1 Catfriend1 self-assigned this Dec 1, 2018
@Catfriend1
Copy link
Owner Author

Reminder: We need to check the config for
a) existance
b) parse-ability
in FirstStartActivity. If anything goes wrong, we'll have to show the welcome slide "key generation" again.

@Catfriend1
Copy link
Owner Author

Catfriend1 commented Dec 18, 2018

Fixed crash, see issue #142 and commit 73c5017

Refactor ConfigXml public functions to allow checking if a valid config exists and trigger key and config (re)genration if something is corrupted.
regardless if syncthing core is running or not.
Remove SyncthingService dependency from SyncConditionsActivity
when syncthing core is not running
Support preserving the "introducedBy" model field of Folder.java (fixes #146)
and accept the same address syntax as syncthing core web UI does.
- Add ConfigXml#isDeviceIdValid
- Do not allow adding empty folder labels or empty device names.
- Update model Folder.java so ConfigXml can handle the ignorePerms XML attribute
@Catfriend1 Catfriend1 added the bug label Dec 22, 2018
@Catfriend1 Catfriend1 merged commit 190826e into master Dec 22, 2018
@Catfriend1 Catfriend1 deleted the 20181201-refactorConfigXml branch December 22, 2018 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant