Skip to content

Observable preferences E (FilePreferences)#8165

Merged
tobiasdiez merged 6 commits into
mainfrom
filePreferences
Oct 19, 2021
Merged

Observable preferences E (FilePreferences)#8165
tobiasdiez merged 6 commits into
mainfrom
filePreferences

Conversation

@calixtus

Copy link
Copy Markdown
Member

Follow up to #8142 #8164

Removed also deprecated method setFile in ParserResult

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@calixtus calixtus added component: preferences status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers dev: code-quality Issues related to code or architecture decisions labels Oct 18, 2021
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("")));

Copy link
Copy Markdown
Member

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

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

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

@calixtus

Copy link
Copy Markdown
Member Author

done

@tobiasdiez tobiasdiez merged commit f328363 into main Oct 19, 2021
@tobiasdiez tobiasdiez deleted the filePreferences branch October 19, 2021 12:36
Siedlerchr added a commit that referenced this pull request Oct 22, 2021
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: preferences dev: code-quality Issues related to code or architecture decisions status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants