From: David ‘Bombe’ Roden Date: Fri, 24 Jul 2015 20:05:30 +0000 (+0200) Subject: Persist compatibility mode in configuration X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=50999afc14ced32f8f15b7512a896bbac1e61562;p=Sone.git Persist compatibility mode in configuration --- 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); + } } /**