A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
update onScroll
ammarahm-eddcc0df943016
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.jsindex 94ed561e0..73be584c6 100644--- a/apps/mobile/src/components/Container/index.js+++ b/apps/mobile/src/components/Container/index.js@@ -27,7 +27,7 @@ const AnimatedTouchableOpacity = Animatable.createAnimatableComponent();const AnimatedSafeAreaView = Animatable.createAnimatableComponent(SafeAreaView);-let previousOffset = 0;+let offsetY = 0;export const Container = ({children,bottomButtonOnPress,@@ -56,20 +56,30 @@ export const Container = ({const [buttonHide, setButtonHide] = useState(false);const insets = useSafeArea();+ let countUp = 1;+ let countDown = 0;let searchResult = [];- const onScroll = currentOffset => {+ const onScroll = y => {if (searchResults.length > 0) return;+ if (y < 30) {+ countUp = 1;+ countDown = 0;+ setHideHeader(false);+ }- if (currentOffset > previousOffset) {- console.log('call A', currentOffset, previousOffset);-+ if (y > offsetY) {+ if (y - offsetY < 150 || countDown > 0) return;+ countDown = 1;+ countUp = 0;setHideHeader(true);} else {- console.log('call B', currentOffset, previousOffset);+ if (offsetY - y < 50 || countUp > 0) return;+ countDown = 0;+ countUp = 1;setHideHeader(false);}- previousOffset = currentOffset;+ offsetY = y;};const onChangeText = value => {