From bb14c0c0c966e669c4d092fd1bf64f20ba288895 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Thu, 6 Feb 2025 16:46:34 +0000 Subject: [PATCH] update logic --- src/services/storage/stateBundler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/storage/stateBundler.ts b/src/services/storage/stateBundler.ts index 560b3c24..3b81e15f 100644 --- a/src/services/storage/stateBundler.ts +++ b/src/services/storage/stateBundler.ts @@ -66,9 +66,9 @@ export class StateBundler { } } - AddValue = (appId: string, key: string, v: number) => { + AddValue = (appId: string, key: string, v: number, updateOnly = false) => { const prevValueKey = `${appId}_${key}` - if (this.prevValues[prevValueKey] === v) { + if (updateOnly && this.prevValues[prevValueKey] === v) { return } this.prevValues[prevValueKey] = v @@ -92,7 +92,7 @@ export class StateBundler { AddBalancePoint = (actionName: BalanceStatePointType, v: number, meta = [], appId = '_root') => { const key = [actionName, ...meta].join('_') - this.AddValue(appId, key, v) + this.AddValue(appId, key, v, true) } AddMaxPoint = (actionName: MaxStatePointType, v: number, meta = [], appId = '_root') => {