add to settings.json the app version written to it last

This commit is contained in:
Armin Schrenk 2023-02-02 16:44:03 +01:00
parent b4faae7fa0
commit 97c0cb4f5f
No known key found for this signature in database
GPG Key ID: 8F2992163CBBA7FC

View File

@ -37,6 +37,7 @@ public class SettingsJsonAdapter extends TypeAdapter<Settings> {
@Override
public void write(JsonWriter out, Settings value) throws IOException {
out.beginObject();
out.name("lastWrittenByVersion").value(env.getAppVersion()+env.getBuildNumber().map("-"::concat).orElse(""));
out.name("directories");
writeVaultSettingsArray(out, value.getDirectories());
out.name("askedForUpdateCheck").value(value.askedForUpdateCheck().get());