Merge branch 'percy-ci-fix' of https://github.com/mirnasilva/Viewers into percy-ci-fix
This commit is contained in:
commit
8dc4a5b82a
@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [3.4.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.4.0...@ohif/viewer@3.4.1) (2020-01-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 🐛 Metadata is being mistakenly purged ([#1360](https://github.com/OHIF/Viewers/issues/1360)) ([b9a66d4](https://github.com/OHIF/Viewers/commit/b9a66d44241f2896ef184511287fb4984671e16d)), closes [#1326](https://github.com/OHIF/Viewers/issues/1326)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [3.4.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.3.8...@ohif/viewer@3.4.0) (2020-01-14)
|
# [3.4.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.3.8...@ohif/viewer@3.4.0) (2020-01-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/viewer",
|
"name": "@ohif/viewer",
|
||||||
"version": "3.4.0",
|
"version": "3.4.1",
|
||||||
"description": "OHIF Viewer",
|
"description": "OHIF Viewer",
|
||||||
"author": "OHIF Contributors",
|
"author": "OHIF Contributors",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useEffect, useContext } from 'react';
|
import React, { useState, useEffect, useContext } from 'react';
|
||||||
import { metadata, studies, utils, log } from '@ohif/core';
|
import { metadata, studies, utils, log } from '@ohif/core';
|
||||||
|
import usePrevious from '../customHooks/usePrevious';
|
||||||
|
|
||||||
import ConnectedViewer from './ConnectedViewer.js';
|
import ConnectedViewer from './ConnectedViewer.js';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@ -128,9 +129,9 @@ const _addSeriesToStudy = (studyMetadata, series) => {
|
|||||||
const _updateMetaDataManager = (study, studyMetadata, series) => {
|
const _updateMetaDataManager = (study, studyMetadata, series) => {
|
||||||
updateMetaDataManager(study, series);
|
updateMetaDataManager(study, series);
|
||||||
|
|
||||||
const { studyInstanceUID } = study;
|
const { studyInstanceUid } = study;
|
||||||
|
|
||||||
if (!studyMetadataManager.get(studyInstanceUID)) {
|
if (!studyMetadataManager.get(studyInstanceUid)) {
|
||||||
studyMetadataManager.add(studyMetadata);
|
studyMetadataManager.add(studyMetadata);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -314,9 +315,15 @@ function ViewerRetrieveStudyData({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const prevStudyInstanceUids = usePrevious(studyInstanceUids);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
studyMetadataManager.purge();
|
const hasStudyInstanceUidsChanged = !(prevStudyInstanceUids && prevStudyInstanceUids.every(e => studyInstanceUids.includes(e)));
|
||||||
purgeCancellablePromises();
|
|
||||||
|
if (hasStudyInstanceUidsChanged) {
|
||||||
|
studyMetadataManager.purge();
|
||||||
|
purgeCancellablePromises();
|
||||||
|
}
|
||||||
}, [studyInstanceUids]);
|
}, [studyInstanceUids]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user