From 61a824d3225f3e57836a45cd5bd0a6f088288098 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 25 Jun 2024 09:04:00 -0700 Subject: [PATCH] sdk: suppress storage event for hidden values --- sdk/src/storage-settings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/src/storage-settings.ts b/sdk/src/storage-settings.ts index 53bc9b57c9..76ab8d9482 100644 --- a/sdk/src/storage-settings.ts +++ b/sdk/src/storage-settings.ts @@ -170,7 +170,8 @@ export class StorageSettings implements Settings { this.device.storage.setItem(key, value?.toString()); } setting?.onPut?.(oldValue, value); - this.device.onDeviceEvent(ScryptedInterface.Settings, undefined); + if (!setting?.hide) + this.device.onDeviceEvent(ScryptedInterface.Settings, undefined); } getItemInternal(key: T, setting: StorageSetting, rawDevice?: boolean): any {