From 27ba8a9703e51da8b81ba25d0f74401f93d97ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20H=C3=B8gh?= Date: Wed, 4 May 2022 14:57:17 +0200 Subject: [PATCH] conflictSearch now has a `stateless` option, which can be set in both build and run-time config. In stateless mode the state of the module will not be kept. Default `false`. --- CHANGELOG.md | 9 ++++++--- extensions/conflictSearch/browser/controller.js | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1d71bfd3..27f06199c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,18 +6,21 @@ and this project adheres to [CalVer](https://calver.org/). ## [UNRELEASED] - 2022-20-4 ### Changed -- In conflictSearch requests to the GC2 SQL API now happens concurrently. This is done by implementing a promise pool. The default size of the pool is 30, but this can be set in the runtime config. Note that this setting can't be changed in a run-time config. +- In conflictSearch requests to the GC2 SQL API now happens concurrently. This is done by implementing a promise pool. The default size of the pool is 30, but this can be set in the build config. Note that this setting can't be changed in a run-time config. +- conflictSearch now has a `stateless` option, which can be set in both build and run-time config. In stateless mode the state of the module will not be kept. Default `false`. ```json { "extensionConfig": { "conflictSearch": { - "poolSize": 40 + "poolSize": 40, + "stateless": true } } } ``` + ### Fixed -- Tile layer opacity state now is kept betweens freshes. +- Tile layer opacity state now is kept betweens browser refreshes. ## [2022.4.0] - 2022-8-4 ### Fixed diff --git a/extensions/conflictSearch/browser/controller.js b/extensions/conflictSearch/browser/controller.js index cd41e9e27..97c7cf220 100644 --- a/extensions/conflictSearch/browser/controller.js +++ b/extensions/conflictSearch/browser/controller.js @@ -263,9 +263,12 @@ module.exports = { }, getState: () => { - let res = conflictSearch.getResult(); - res.reportType = reportType; - return res; + if (config?.extensionConfig?.conflictSearch?.stateless) { + return {}; + } + let state = conflictSearch.getResult(); + state.reportType = reportType; + return state; }, applyState: (newState) => {