From 6ddf9a24d0812202cceedadb3d45d4d19e921375 Mon Sep 17 00:00:00 2001 From: Monish Syed Date: Wed, 2 Aug 2017 01:10:54 -0500 Subject: [PATCH] Issue: Everytime the app starts the fbvalue is reset to the defaul value. Cause: Creating a new instance of FBTweak and setting the current value to nil resets the UserDefaults value. FBTweak gets instantiated with an identifier which is therefore used as a key to get the value for UserDefaulst store so there is no need to set the current value to nil when instantiating a new FBTweak --- Barricade/Tweaks/MMBarricadeTweaksResponseStore.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Barricade/Tweaks/MMBarricadeTweaksResponseStore.m b/Barricade/Tweaks/MMBarricadeTweaksResponseStore.m index 7b4dfd6..edc85d4 100644 --- a/Barricade/Tweaks/MMBarricadeTweaksResponseStore.m +++ b/Barricade/Tweaks/MMBarricadeTweaksResponseStore.m @@ -116,7 +116,6 @@ - (FBTweak *)tweakForResponseSet:(MMBarricadeResponseSet *)responseSet { tweak = [[FBTweak alloc] initWithIdentifier:tweakName]; tweak.name = tweakName; tweak.possibleValues = array; - tweak.currentValue = nil; tweak.defaultValue = defaultValue; [collection addTweak:tweak]; }