update logic
This commit is contained in:
parent
c0f137d996
commit
bb14c0c0c9
1 changed files with 3 additions and 3 deletions
|
|
@ -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') => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue