From 510ca21cf59c78618d69d1d252748ab5455ebdfa Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 25 Mar 2022 09:07:17 +0800 Subject: [PATCH] ui: ignore records popup when record not visible --- packages/ui-default/components/scratchpad/reducers/ui.ts | 2 +- packages/ui-default/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-default/components/scratchpad/reducers/ui.ts b/packages/ui-default/components/scratchpad/reducers/ui.ts index aa144e751..257868f14 100644 --- a/packages/ui-default/components/scratchpad/reducers/ui.ts +++ b/packages/ui-default/components/scratchpad/reducers/ui.ts @@ -61,7 +61,7 @@ export default function reducer(state = { case 'SCRATCHPAD_POST_PRETEST_FULFILLED': case 'SCRATCHPAD_POST_SUBMIT_FULFILLED': { Notification.success(i18n('Submitted.')); - if (action.type === 'SCRATCHPAD_POST_SUBMIT_FULFILLED') { + if (action.type === 'SCRATCHPAD_POST_SUBMIT_FULFILLED' && UiContext.canViewRecord) { state.records.visible = true; } return { diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 633745e6d..0fe62c897 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.34.22", + "version": "4.34.23", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js",