Skip to content

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

mobile: fix title hidden on navigate sometimes

ammarahm-ed06399fe3bd28
diff --git a/apps/mobile/app/components/header/title.js b/apps/mobile/app/components/header/title.js
index 15e762623..54ba64e3a 100644
--- a/apps/mobile/app/components/header/title.js
+++ b/apps/mobile/app/components/header/title.js
@@ -63,13 +63,15 @@ export const Title = () => {
}
if (data.y > 150) {
if (!hide) return;
+ titleState[currentScreen.id] = false;
setHide(false);
} else {
if (hide) return;
+ titleState[currentScreen.id] = true;
setHide(true);
}
},
- [currentScreen.name, hide]
+ [currentScreen.id, currentScreen.name, hide]
);
useEffect(() => {
@@ -84,10 +86,6 @@ export const Title = () => {
}
}, [currentScreen.id, currentScreen.name]);
- useEffect(() => {
- titleState[currentScreen.id] = hide;
- }, [currentScreen.id, hide]);
-
useEffect(() => {
eSubscribeEvent(eScrollEvent, onScroll);
return () => {