From 50999afc14ced32f8f15b7512a896bbac1e61562 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 24 Jul 2015 22:05:30 +0200 Subject: [PATCH] Persist compatibility mode in configuration --- src/main/java/net/pterodactylus/sone/core/Core.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 68cf4b2..b4a94e4 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1621,6 +1621,9 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, configuration.getStringValue("SoneFollowingTimes/" + soneCounter + "/Sone").setValue(null); } + /* save compatibility modes. */ + configuration.getBooleanValue("CompatibilityModes/OldElementIds").setValue(compatibilityModes.contains(CompatibilityMode.oldElementIds)); + /* save known posts. */ database.save(); @@ -1669,6 +1672,11 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } ++soneCounter; } + + /* load compatibility modes. */ + if (configuration.getBooleanValue("CompatibilityModes/OldElementIds").getValue(false)) { + setCompatibilityMode(CompatibilityMode.oldElementIds); + } } /** -- 2.7.4