web: files: Hide header menu in favorites dir, when selected file removed from favorites

This commit is contained in:
Vladislav Makhov 2020-12-18 14:24:28 +03:00
parent ee1eaf22ae
commit dda45f3282

View File

@ -280,6 +280,7 @@ class SectionBodyContent extends React.Component {
fetchFavoritesFolder, fetchFavoritesFolder,
isFavorites, isFavorites,
selectedFolderId, selectedFolderId,
setSelected,
//selection, //selection,
t, t,
} = this.props; } = this.props;
@ -299,6 +300,7 @@ class SectionBodyContent extends React.Component {
: getFileInfo(id); : getFileInfo(id);
}) })
.then(() => toastr.success(t("RemovedFromFavorites"))) .then(() => toastr.success(t("RemovedFromFavorites")))
.then(() => setSelected("close"))
.catch((e) => toastr.error(e)); .catch((e) => toastr.error(e));
default: default:
return; return;