Skip to content

Commit 071070b

Browse files
committed
Remove notifications for autosave (partial fix for JabRef#5555)
1 parent 629e2d9 commit 071070b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main/java/org/jabref/gui/dialogs/AutosaveUIManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public AutosaveUIManager(BasePanel panel) {
2626
@Subscribe
2727
public void listen(@SuppressWarnings("unused") AutosaveEvent event) {
2828
try {
29-
new SaveDatabaseAction(panel, Globals.prefs, Globals.entryTypesManager).save();
29+
new SaveDatabaseAction(panel, Globals.prefs, Globals.entryTypesManager).save(true);
3030
} catch (Throwable e) {
3131
LOGGER.error("Problem occured while saving.", e);
3232
}

src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ private void saveWithDifferentEncoding(Path file, boolean selectedOnly, Charset
120120
}
121121

122122
private boolean doSave() {
123+
panel.setSaving(true);
123124
Path targetPath = panel.getBibDatabaseContext().getDatabasePath().get();
124125
try {
125126
// Save the database
@@ -158,9 +159,14 @@ private boolean doSave() {
158159
}
159160

160161
public boolean save() {
162+
return save(false);
163+
}
164+
165+
public boolean save(boolean silent) {
161166
if (panel.getBibDatabaseContext().getDatabasePath().isPresent()) {
162-
panel.frame().getDialogService().notify(Localization.lang("Saving library") + "...");
163-
panel.setSaving(true);
167+
if (!silent) {
168+
panel.frame().getDialogService().notify(Localization.lang("Saving library") + "...");
169+
}
164170
return doSave();
165171
} else {
166172
Optional<Path> savePath = getSavePath();

0 commit comments

Comments
 (0)