-
-
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
Fix GroupTree wrongly displayed #9451
Conversation
- fix: Globals.getFileUpdateMonitor() used for the resolved file (and not the dummy one) - more comments
- Replace strange "LibraryTab.Factory" by a static method - Remove unused method "trackOpenNewDatabase" in JabRefFrame
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Do you want to integrate the functionality of #9450 ? Otherwise we will have merge conflicts... |
measurements.put("NumberOfEntries", (double) libraryTab.getBibDatabaseContext().getDatabase().getEntryCount()); | ||
|
||
Globals.getTelemetryClient().ifPresent(client -> client.trackEvent("OpenNewDatabase", properties, measurements)); | ||
Globals.getTelemetryClient().ifPresent(client -> client.trackEvent( |
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.
Even though we currently don't do any telemetry, I think this method needs to be added inside the LibraryTab to the BackgroundTask otherwise it's not excuted If I remember that correctly from my debug session
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.
The user is still asked to provide his OK for telemetry. I only changed the code to a lambda function (which I found more readable).
The method is connected to the backgroudntask on line 181:
backgroundTask.onFinished(() -> trackOpenNewDatabase(newTab))
Thus, I do not see any need to change something here 😇
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.
Eclipse was giving me warning: Unlikely argument type for equals(): LibraryTab seems to be unrelated to ReadOnlyObjectProperty
// it doesn't handle the case when a library is loaded asynchronously. | ||
stateManager.setActiveDatabase(bibDatabaseContext); | ||
|
||
if (this.getTabPane().getSelectionModel().selectedItemProperty().equals(this)) { |
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.
if (this.getTabPane().getSelectionModel().selectedItemProperty().equals(this)) { | |
if (this.getTabPane().getSelectionModel().selectedItemProperty().get().equals(this)) { |
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.
@calixtus prevented me from using frame.getCurrentLibraryTab().equals(this)
, because he wants to get rid of frame
. Fixed.
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.
Yes I did and I'm not even ashamed of it.
# Conflicts: # src/main/java/org/jabref/gui/LibraryTab.java
- add comment on backgroundTask execution - remove unused variable
// In case the user opted for restoring a backup, the content of the backup is contained in parserResult. | ||
parserResult = BackupUIManager.showRestoreBackupDialog(dialogService, fileToLoad, preferencesService).orElse(null); | ||
} | ||
|
||
try { | ||
if (result == null) { | ||
result = OpenDatabase.loadDatabase(fileToLoad, | ||
if (parserResult == null) { | ||
// No backup was restored, do the "normal" loading |
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.
Well done for including the comments. I wrote that, but if I had to read it again in a year, I wouldn't know what is going on. I guess comments aren't useless after all.
Fixes JabRef#637 and refines some other code.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)