From b8ec689ce9bd6fe89e4b825a988edb63fb51b5ab Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Mon, 11 Dec 2023 13:34:53 -0800 Subject: Internal Changes: Add Config Transform function (#769) Added Config Transform function. #769 --- .../skyhanni/features/mining/powdertracker/PowderTracker.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining') diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 63ae5763e..ce5a8dd48 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -174,11 +174,8 @@ object PowderTracker { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(2, "misc.powderTrackerConfig", "mining.powderTracker") - - event.move(8, "#profile.powderTracker", "#profile.powderTracker") { old -> - old.asJsonObject.get("0") - } - event.move(11, "mining.powderTracker.textFormat", "mining.powderTracker.textFormat") { element -> + event.transform(8, "#profile.powderTracker") { old -> old.asJsonObject.get("0") } + event.transform(11, "mining.powderTracker.textFormat") { element -> ConfigUtils.migrateIntArrayListToEnumArrayList(element, PowderDisplayEntry::class.java) } } -- cgit