Use the existing entitlement refresh task when leaving the local store, marketplace, currency shop, or Premium Account shop. Use the same path for the explicit and ordinary browser close actions. Verified GUI patch application and Quirrel syntax.
31 lines
1.6 KiB
JSON
31 lines
1.6 KiB
JSON
{
|
|
"id": "online-shop/defer-explicit-browser-update-to-close",
|
|
"title": "Refresh local commerce once from the browser close handler",
|
|
"file": "scripts/onlineshop/browserwnd.nut",
|
|
"program_behaviour": {
|
|
"stock": "The browser close-and-update control issues a refresh before closing the window.",
|
|
"patched": "For local commerce, the control closes the window and leaves the refresh to its close handler."
|
|
},
|
|
"derivation": {
|
|
"requirement": "Perform the same profile refresh for the close-and-update control and other close paths.",
|
|
"cause": "The control already requests an update. A second update before the first completes could add a redundant task.",
|
|
"lighter_options_ruled_out": [
|
|
"The local service observes requests and grants. The window lifecycle is managed by the client.",
|
|
"Keep two refresh paths for local commerce. This can send two native tasks for one close."
|
|
],
|
|
"if_not_applied": "The explicit close-and-update control can request an extra refresh."
|
|
},
|
|
"features": [
|
|
"G-Store",
|
|
"G-Marketplace"
|
|
],
|
|
"evidence": [
|
|
"2.61.0.37 scripts/onlineshop/browserwnd.nut: BrowserModalHandler.browserCloseAndUpdateEntitlements.",
|
|
"gui-patches/online-shop/refresh-profile-after-browser-close: local commerce close detection."
|
|
],
|
|
"edit": {
|
|
"find": " function browserCloseAndUpdateEntitlements() {\r\n addTask(updateEntitlementsLimited(),",
|
|
"replace": " function browserCloseAndUpdateEntitlements() {\r\n if (this.isLocalCommercePage())\r\n return this.goBack()\r\n\r\n addTask(updateEntitlementsLimited(),"
|
|
}
|
|
}
|