remove notification removal from code from photoswipe

This commit is contained in:
Abhinav 2022-06-07 19:03:39 +05:30
parent b9b4a9b617
commit a8787cd2d6

View file

@ -20,7 +20,6 @@ import { FILE_TYPE } from 'constants/file';
import { sleep } from 'utils/common'; import { sleep } from 'utils/common';
import { playVideo, pauseVideo } from 'utils/photoFrame'; import { playVideo, pauseVideo } from 'utils/photoFrame';
import { PublicCollectionGalleryContext } from 'utils/publicCollectionGallery'; import { PublicCollectionGalleryContext } from 'utils/publicCollectionGallery';
import { GalleryContext } from 'pages/gallery';
import { AppContext } from 'pages/_app'; import { AppContext } from 'pages/_app';
import { InfoModal } from './InfoDialog'; import { InfoModal } from './InfoDialog';
import { defaultLivePhotoDefaultOptions } from 'constants/photoswipe'; import { defaultLivePhotoDefaultOptions } from 'constants/photoswipe';
@ -58,7 +57,6 @@ function PhotoSwipe(props: Iprops) {
const publicCollectionGalleryContext = useContext( const publicCollectionGalleryContext = useContext(
PublicCollectionGalleryContext PublicCollectionGalleryContext
); );
const galleryContext = useContext(GalleryContext);
const appContext = useContext(AppContext); const appContext = useContext(AppContext);
useEffect(() => { useEffect(() => {
@ -237,8 +235,6 @@ function PhotoSwipe(props: Iprops) {
videoTag.pause(); videoTag.pause();
} }
handleCloseInfo(); handleCloseInfo();
// BE_AWARE: this will clear any notification set, even if they were not set in/by the photoswipe component
galleryContext.setNotificationAttributes(null);
}; };
const isInFav = (file) => { const isInFav = (file) => {
const { favItemIds } = props; const { favItemIds } = props;