-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Observable preferences E (FilePreferences) #8165
Conversation
put(IMPORT_FILENAMEPATTERN, preferences.getFileNamePattern()); | ||
put(IMPORT_FILEDIRPATTERN, preferences.getFileDirectoryPattern()); | ||
putBoolean(DOWNLOAD_LINKED_FILES, preferences.shouldDownloadLinkedFiles()); | ||
EasyBind.subscribe(filePreferences.mainFileDirectoryProperty(), newValue -> put(MAIN_FILE_DIRECTORY, filePreferences.getFileDirectory().map(Path::toString).orElse(""))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subscripe runs the lambda immediately, which leads to an unnecessary write of the preferences. Easybind.listen
should be used instead. https://github.com/tobiasdiez/EasyBind#subscribe-to-values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgm from my side. Just do what Tobias said
done |
…idth * upstream/main: Observable preferences E (FilePreferences) (#8165) More checkstyle fixes Fix checkstyle Remove Elsevier test Pass-through base URL to allow for relative URL resolution Use customBase also at DoiResolution (if enabled) Add some code comments Revert "Add first try to check for content type" Add first try to check for content type Add test for paywalled articles Change from http to https for the referrer
Follow up to #8142 #8164
Removed also deprecated method setFile in ParserResult
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)