Always synchronize ui with loaded state by reloadFromDisk function

This commit is contained in:
Marcel Haßlinger 2021-05-25 11:34:30 +02:00
parent 1efcde7cb2
commit 2090167399

View File

@ -60,6 +60,9 @@ public class DataStore {
translations = new Translations(new ArrayList<>(),
new LocalizedNode(LocalizedNode.ROOT_KEY, new ArrayList<>()));
// Propagate changes
synchronizer.forEach(synchronizer -> synchronizer.synchronize(translations, searchQuery));
} else {
TranslatorIO io = IOUtil.determineFormat(localesPath);
@ -74,6 +77,9 @@ public class DataStore {
// If state cannot be loaded from disk, show empty instance
this.translations = new Translations(new ArrayList<>(),
new LocalizedNode(LocalizedNode.ROOT_KEY, new ArrayList<>()));
// Propagate changes
synchronizer.forEach(synchronizer -> synchronizer.synchronize(translations, searchQuery));
}
});
}