Skip to content

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

fix floating button position

ammarahm-ed01900f2d515e
diff --git a/apps/mobile/src/components/container/floatingbutton.js b/apps/mobile/src/components/container/floatingbutton.js
index 3967e8e14..2bd46ea26 100644
--- a/apps/mobile/src/components/container/floatingbutton.js
+++ b/apps/mobile/src/components/container/floatingbutton.js
@@ -68,7 +68,7 @@ export const FloatingButton = ({ title, onPress, color = 'accent', shouldShow =
}, [deviceMode]);
const paddings = {
ios: insets.bottom === 0 ? 70 : insets.bottom + 15,
- android: insets.bottom + 80,
+ android: insets.bottom,
iPad: insets.bottom
};
diff --git a/apps/mobile/src/navigation/navigationstack.js b/apps/mobile/src/navigation/navigationstack.js
index 7a4564acc..25710a3d7 100644
--- a/apps/mobile/src/navigation/navigationstack.js
+++ b/apps/mobile/src/navigation/navigationstack.js
@@ -24,6 +24,9 @@ import { useThemeStore } from '../stores/use-theme-store';
import { history } from '../utils';
import { rootNavigatorRef } from '../utils/global-refs';
import { hideAllTooltips } from '../utils/hooks/use-tooltip';
+import { useWindowDimensions } from 'react-native';
+import { useSafeAreaInsets } from 'react-native-safe-area-context';
+import { useSettingStore } from '../stores/use-setting-store';
const NativeStack = createNativeStackNavigator();
const IntroStack = createNativeStackNavigator();
@@ -61,6 +64,9 @@ const Tabs = React.memo(
const colors = useThemeStore(state => state.colors);
const homepage = SettingsService.get().homepage;
const showWelcome = !SettingsService.get().introCompleted;
+ const height = useSettingStore(state => state.dimensions.height);
+ const insets = useSafeAreaInsets();
+ const screenHeight = height - (50 + insets.top + insets.bottom);
React.useEffect(() => {
setTimeout(() => {
useNavigationStore.getState().update({ name: homepage });
@@ -77,7 +83,8 @@ const Tabs = React.memo(
lazy: false,
animation: 'none',
contentStyle: {
- backgroundColor: colors.bg
+ backgroundColor: colors.bg,
+ height: screenHeight
}
}}
>