From 2260140877225ed3706f1afefb23c75ff2cd7ce8 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 19 Nov 2024 00:27:08 +0800 Subject: [PATCH] PZHoYoLABKit // Only hinders duplicated abyss upload if not DEBUG build. --- .../AssociatedModules/AbyssDataCollectors/AbyssCollector.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/PZHoYoLabKit/Sources/PZHoYoLabKit/AssociatedModules/AbyssDataCollectors/AbyssCollector.swift b/Packages/PZHoYoLabKit/Sources/PZHoYoLabKit/AssociatedModules/AbyssDataCollectors/AbyssCollector.swift index cb0f19133..dec5a58c4 100644 --- a/Packages/PZHoYoLabKit/Sources/PZHoYoLabKit/AssociatedModules/AbyssDataCollectors/AbyssCollector.swift +++ b/Packages/PZHoYoLabKit/Sources/PZHoYoLabKit/AssociatedModules/AbyssDataCollectors/AbyssCollector.swift @@ -167,7 +167,9 @@ extension AbyssCollector { encoder.outputFormatting = [.sortedKeys] let dataToSend = try encoder.encode(dataPack) + #if !DEBUG guard !Defaults[md5Key].contains(md5) else { throw ACError.alreadyUploaded } + #endif func saveMD5() { Defaults[md5Key].append(md5)