Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix top search bar show/hide on scroll

ammarahm-ed2d5e0b8cb6e4
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.js
index 73be584c6..cff9cbfdf 100644
--- a/apps/mobile/src/components/Container/index.js
+++ b/apps/mobile/src/components/Container/index.js
@@ -66,20 +66,26 @@ export const Container = ({
countUp = 1;
countDown = 0;
setHideHeader(false);
+ offsetY = y;
}
if (y > offsetY) {
- if (y - offsetY < 150 || countDown > 0) return;
+ console.log('here');
+ if (y - offsetY < 100) return;
+ console.log('then here');
countDown = 1;
countUp = 0;
setHideHeader(true);
+ offsetY = y;
} else {
- if (offsetY - y < 50 || countUp > 0) return;
+ console.log('here2');
+ if (offsetY - y < 50) return;
+ console.log('then here2');
countDown = 0;
countUp = 1;
setHideHeader(false);
+ offsetY = y;
}
- offsetY = y;
};
const onChangeText = value => {