Commit 666071d5 authored by Martin Santangelo's avatar Martin Santangelo

(feat) report post view swiper

parent b7b85664
import React from 'react';
import React, { useEffect } from 'react';
import { ActivityFullScreenParamList } from '../../../navigation/NavigationTypes';
import { RouteProp } from '@react-navigation/native';
import { useLocalStore, observer } from 'mobx-react';
......@@ -38,9 +38,23 @@ const ViewerScreen = observer((props: PropsType) => {
}
store.index = v;
// report viewed with metadata
feedStore.addViewed(feedStore.entities[store.index]);
},
}));
useEffect(() => {
feedStore.viewed.clearViewed();
feedStore.metadataService?.pushSource('single');
// report initial as viewed with metadata
feedStore.addViewed(feedStore.entities[store.index]);
return () => {
feedStore.viewed.clearViewed();
feedStore.metadataService?.popSource();
};
}, [feedStore, store]);
const { width, height } = useDimensions().window;
const translationX = width * 0.13;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment