diff --git a/CHANGELOG.md b/CHANGELOG.md index 20279111ab83..62205ee0ed9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,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 diff --git a/cvat-ui/src/reducers/review-reducer.ts b/cvat-ui/src/reducers/review-reducer.ts index f7b025aab656..a8c6d32e0d94 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; }