From e4a8159ca1a23442a330f5ad959be4f782bff1d1 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 3 Dec 2020 15:01:29 +0300 Subject: [PATCH 1/2] Reset state after logout & changing a job --- cvat-ui/package-lock.json | 2 +- cvat-ui/package.json | 2 +- cvat-ui/src/reducers/review-reducer.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index d213d6a7..45c2f0f4 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.11.4", + "version": "1.11.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index b8dda7db..b3f718c5 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.11.4", + "version": "1.11.5", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/reducers/review-reducer.ts b/cvat-ui/src/reducers/review-reducer.ts index f7b025aa..a8c6d32e 100644 --- a/cvat-ui/src/reducers/review-reducer.ts +++ b/cvat-ui/src/reducers/review-reducer.ts @@ -5,6 +5,7 @@ import consts from 'consts'; import { AnnotationActionTypes } from 'actions/annotation-actions'; import { ReviewActionTypes } from 'actions/review-actions'; +import { AuthActionTypes } from 'actions/auth-actions'; import { ReviewState } from './interfaces'; const defaultState: ReviewState = { @@ -184,6 +185,10 @@ export default function (state: ReviewState = defaultState, action: any): Review issuesHidden: hidden, }; } + case AnnotationActionTypes.CLOSE_JOB: + case AuthActionTypes.LOGOUT_SUCCESS: { + return { ...defaultState }; + } default: return state; } From cc3e977f359bb70d83b813aabd237a33c921793e Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 3 Dec 2020 15:04:54 +0300 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7933f47..fbfb1374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Disabled position editing in AAM () - TypeError: Cannot read property 'toString' of undefined () - Extra shapes are drawn after Esc, or G pressed while drawing a region in grouping () +- Reset state (reviews, issues) after logout or changing a job () ### Security