Web: Added update files to update the number of icons.

This commit is contained in:
Tatiana Lopaeva 2022-11-15 11:12:02 +03:00
parent 8e14aad3f5
commit eab3833835

View File

@ -80,7 +80,11 @@ class NewFilesPanel extends React.Component {
onNewFileClick = (e) => {
const { id, extension: fileExst } = e.target.dataset;
const { /* updateFolderBadge, */ markAsRead, newFiles } = this.props;
const {
/* updateFolderBadge, */ markAsRead,
newFiles,
refreshFiles,
} = this.props;
const readingFiles = this.state.readingFiles;
const fileIds = fileExst ? [id] : [];
@ -97,6 +101,7 @@ class NewFilesPanel extends React.Component {
this.setState({ readingFiles });
this.onFileClick(item);
})
.then(() => refreshFiles())
.catch((err) => toastr.error(err));
};