logError if largeThumbnail left after migration complete
This commit is contained in:
parent
69067d89da
commit
565f871a3d
|
@ -8,6 +8,7 @@ import {
|
|||
replaceThumbnail,
|
||||
} from 'services/migrateThumbnailService';
|
||||
import { getData, LS_KEYS, setData } from 'utils/storage/localStorage';
|
||||
import { logError } from 'utils/sentry';
|
||||
|
||||
export type SetProgressTracker = React.Dispatch<
|
||||
React.SetStateAction<{
|
||||
|
@ -73,6 +74,13 @@ export default function FixLargeThumbnails(props: Props) {
|
|||
if (fixState === FIX_STATE.NOT_STARTED) {
|
||||
props.show();
|
||||
}
|
||||
if (
|
||||
fixState === FIX_STATE.COMPLETED &&
|
||||
largeThumbnailFiles.length > 0
|
||||
) {
|
||||
updateFixState(FIX_STATE.NOT_STARTED);
|
||||
logError(Error(), 'large thumbnail files left after migration');
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
if (props.isOpen && fixState !== FIX_STATE.RUNNING) {
|
||||
|
|
Loading…
Reference in a new issue