Skip to content

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

Merge branch 'master' into feat-launcher-shortcut-actions

ammarahm-ed275d2be5ac08
diff --cc apps/mobile/app/navigation/navigation-stack.js
index f32c42237,398060837..f55ad69ab
--- a/apps/mobile/app/navigation/navigation-stack.js
+++ b/apps/mobile/app/navigation/navigation-stack.js
@@@ -20,9 -20,9 +20,11 @@@ along with this program. If not, see <
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as React from "react";
- import { useSafeAreaInsets } from "react-native-safe-area-context";
++import { SafeAreaView } from "react-native";
import Container from "../components/container";
++import DelayLayout from "../components/delay-layout";
import Intro from "../components/intro";
+ import useGlobalSafeAreaInsets from "../hooks/use-global-safe-area-insets";
import { hideAllTooltips } from "../hooks/use-tooltip";
import Favorites from "../screens/favorites";
import Home from "../screens/home";
@@@ -40,6 -40,6 +42,7 @@@ import Trash from "../screens/trash"
import { eSendEvent } from "../services/event-manager";
import SettingsService from "../services/settings";
import useNavigationStore from "../stores/use-navigation-store";
++import { useNoteStore } from "../stores/use-notes-store";
import { useSelectionStore } from "../stores/use-selection-store";
import { useSettingStore } from "../stores/use-setting-store";
import { useThemeStore } from "../stores/use-theme-store";
@@@ -88,8 -84,7 +87,8 @@@ const _Tabs = () =>
(state) => state.settings.introCompleted
);
const height = useSettingStore((state) => state.dimensions.height);
- const insets = useSafeAreaInsets();
+ const loading = useNoteStore((state) => state.loading);
+ const insets = useGlobalSafeAreaInsets();
const screenHeight = height - (50 + insets.top + insets.bottom);
React.useEffect(() => {
setTimeout(() => {
diff --cc apps/mobile/app/navigation/tabs-holder.js
index 1fe530425,e06758e68..b6a7c0c3a
--- a/apps/mobile/app/navigation/tabs-holder.js
+++ b/apps/mobile/app/navigation/tabs-holder.js
@@@ -34,16 -34,14 +34,19 @@@ import Animated,
useSharedValue,
withTiming
} from "react-native-reanimated";
- import { useSafeAreaInsets } from "react-native-safe-area-context";
-import { SafeAreaProvider } from "react-native-safe-area-context";
import { notesnook } from "../../e2e/test.ids";
+ import { db } from "../common/database";
import { SideMenu } from "../components/side-menu";
import { FluidTabs } from "../components/tabs";
+ import useGlobalSafeAreaInsets from "../hooks/use-global-safe-area-insets";
++import { useShortcutManager } from "../hooks/use-shortcut-manager";
+ import { hideAllTooltips } from "../hooks/use-tooltip";
-import { editorController, editorState } from "../screens/editor/tiptap/utils";
+import {
+ clearAppState,
+ editorController,
+ editorState,
+ getAppState
+} from "../screens/editor/tiptap/utils";
import { EditorWrapper } from "../screens/editor/wrapper";
import { DDS } from "../services/device-detection";
import {
@@@ -63,11 -60,7 +65,8 @@@ import
eOpenFullscreenEditor
} from "../utils/events";
import { editorRef, tabBarRef } from "../utils/global-refs";
- import { hideAllTooltips } from "../hooks/use-tooltip";
- import { NavigationStack } from "./navigation-stack";
- import { useCallback } from "react";
- import { useShortcutManager } from "../hooks/use-shortcut-manager";
+import { sleep } from "../utils/time";
+ import { NavigationStack } from "./navigation-stack";
const _TabsHolder = () => {
const colors = useThemeStore((state) => state.colors);
diff --cc apps/mobile/app/screens/editor/tiptap/use-editor.ts
index 87ae3666f,435fcade5..26bf74b74
--- a/apps/mobile/app/screens/editor/tiptap/use-editor.ts
+++ b/apps/mobile/app/screens/editor/tiptap/use-editor.ts
@@@ -18,9 -18,10 +18,9 @@@ along with this program. If not, see <
*/
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
- import { useSafeAreaInsets } from "react-native-safe-area-context";
import WebView from "react-native-webview";
import { db } from "../../../common/database";
-import { MMKV } from "../../../common/database/mmkv";
+ import useGlobalSafeAreaInsets from "../../../hooks/use-global-safe-area-insets";
import { DDS } from "../../../services/device-detection";
import {
eSendEvent,
diff --cc apps/mobile/app/screens/editor/wrapper.js
index cec5d6df3,ee51be590..26466af5b
--- a/apps/mobile/app/screens/editor/wrapper.js
+++ b/apps/mobile/app/screens/editor/wrapper.js
@@@ -39,8 -40,8 +39,8 @@@ import { editorController, editorState
export const EditorWrapper = ({ width }) => {
const colors = useThemeStore((state) => state.colors);
const deviceMode = useSettingStore((state) => state.deviceMode);
- const loading = useNoteStore((state) => state.loading);
+ const loading = false;
- const insets = useSafeAreaInsets();
+ const insets = useGlobalSafeAreaInsets();
const floating = useIsFloatingKeyboard();
const introCompleted = useSettingStore(
(state) => state.settings.introCompleted