fix(pda): enforce sealed pallet contract and deduplicate activation refresh

This commit is contained in:
2026-09-09 12:35:03 +08:00
parent b19cecb54f
commit b03d5e1561
5 changed files with 56 additions and 6 deletions
+10 -2
View File
@@ -532,6 +532,8 @@
},
async onShow() {
if (!requireSession()) return
if (this._pageVisible) return this._showRefreshPromise
this._pageVisible = true
this.currentUser = session.currentUser
this.startHardwareScanner()
if (this.cameraPicking) {
@@ -543,10 +545,16 @@
this.debugEvidence('preview.resume', { evidenceIdentity: this.evidenceIdentity })
return
}
await this.refreshAvailableBoxes()
await this.syncRemoteTask()
if (this._showRefreshPromise) return this._showRefreshPromise
this._showRefreshPromise = (async () => {
await this.refreshAvailableBoxes()
await this.syncRemoteTask()
})()
try { await this._showRefreshPromise }
finally { this._showRefreshPromise = null }
},
onHide() {
this._pageVisible = false
if (this.evidencePreviewOpening) {
this.evidencePreviewOpening = false
this.evidencePreviewReturning = true