diff --git a/apps/mobile/app/components/auth/session-expired.js b/apps/mobile/app/components/auth/session-expired.js
index cb6bf2109..8b6a4f12e 100644
--- a/apps/mobile/app/components/auth/session-expired.js
+++ b/apps/mobile/app/components/auth/session-expired.js
@@ -44,8 +44,10 @@ import Paragraph from "../ui/typography/paragraph";
import { LoginSteps, useLogin } from "./use-login";
function getObfuscatedEmail(email) {
- if (!email) return null;
- return email.replace(/(.{2})(.*)(?=@)/, function (gp1, gp2, gp3) {
+ if (!email) return "";
+ const [username, provider] = email.split("@");
+ if (username.length === 1) return `****@${provider}`;
+ return email.replace(/(.{1})(.*)(?=@)/, function (gp1, gp2, gp3) {
for (let i = 0; i < gp3.length; i++) {
gp2 += "*";
}
diff --git a/apps/mobile/app/components/launcher/index.js b/apps/mobile/app/components/launcher/index.js
index a6a0fc007..a3a4a349f 100644
--- a/apps/mobile/app/components/launcher/index.js
+++ b/apps/mobile/app/components/launcher/index.js
@@ -37,6 +37,7 @@ import { useNoteStore } from "../../stores/use-notes-store";
import { useSettingStore } from "../../stores/use-setting-store";
import { useThemeStore } from "../../stores/use-theme-store";
import { useUserStore } from "../../stores/use-user-store";
+import { AndroidModule } from "../../utils";
import { eOpenAnnouncementDialog } from "../../utils/events";
import { getGithubVersion } from "../../utils/github-version";
import { SIZE } from "../../utils/size";
@@ -192,6 +193,11 @@ const Launcher = React.memo(
const onUnlockBiometrics = useCallback(async () => {
if (!(await BiometricService.isBiometryAvailable())) return;
+ if (Platform.OS === "android") {
+ const activityName = await AndroidModule.getActivityName();
+ if (activityName !== "MainActivity") return;
+ }
+
let verified = await BiometricService.validateUser(
"Unlock to access your notes",
""
diff --git a/apps/mobile/app/components/properties/items.js b/apps/mobile/app/components/properties/items.js
index ecc4af752..1c8ab6e4e 100644
--- a/apps/mobile/app/components/properties/items.js
+++ b/apps/mobile/app/components/properties/items.js
@@ -116,11 +116,11 @@ export const Items = ({ item, buttons, close }) => {
key={item.id}
testID={"icon-" + item.id}
customStyle={{
- alignItems: "center",
+ alignSelf: "flex-start",
width: topBarItemWidth,
- marginBottom: 10,
marginRight: isLast ? 0 : 10,
- backgroundColor: "transparent"
+ backgroundColor: "transparent",
+ paddingHorizontal: 0
}}
>
{
/>
-
+
{item.title}
diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.js
index 766b6418e..1e26410da 100644
--- a/apps/mobile/app/components/sheets/sort/index.js
+++ b/apps/mobile/app/components/sheets/sort/index.js
@@ -25,7 +25,6 @@ import Navigation from "../../../services/navigation";
import { useThemeStore } from "../../../stores/use-theme-store";
import { GROUP, SORT } from "../../../utils/constants";
import { refreshNotesPage } from "../../../utils/events";
-import layoutmanager from "../../../utils/layout-manager";
import { SIZE } from "../../../utils/size";
import { Button } from "../../ui/button";
import Seperator from "../../ui/seperator";
@@ -39,7 +38,6 @@ const Sort = ({ type, screen }) => {
const updateGroupOptions = async (_groupOptions) => {
await db.settings.setGroupOptions(type, _groupOptions);
- layoutmanager.withSpringAnimation(600);
setGroupOptions(_groupOptions);
setTimeout(() => {
if (screen !== "TopicSheet") Navigation.queueRoutesForUpdate(screen);
diff --git a/apps/mobile/app/hooks/use-actions.js b/apps/mobile/app/hooks/use-actions.js
index 3c2528b19..80da7c661 100644
--- a/apps/mobile/app/hooks/use-actions.js
+++ b/apps/mobile/app/hooks/use-actions.js
@@ -613,7 +613,7 @@ export const useActions = ({ close = () => null, item }) => {
},
{
id: "pin",
- title: item.pinned ? "Unpin" : "Pin",
+ title: "Pin",
icon: item.pinned ? "pin-off-outline" : "pin-outline",
func: pinItem,
close: false,
@@ -623,7 +623,7 @@ export const useActions = ({ close = () => null, item }) => {
},
{
id: "favorite",
- title: !item.favorite ? "Favorite" : "Unfavorite",
+ title: "Favorite",
icon: item.favorite ? "star-off" : "star-outline",
func: addToFavorites,
close: false,
diff --git a/apps/mobile/app/hooks/use-app-events.js b/apps/mobile/app/hooks/use-app-events.js
index c580168a7..7f7158e20 100644
--- a/apps/mobile/app/hooks/use-app-events.js
+++ b/apps/mobile/app/hooks/use-app-events.js
@@ -571,8 +571,8 @@ export const useAppEvents = () => {
if (notesAddedFromIntent || shareExtensionOpened) {
let id = useEditorStore.getState().currentEditingNote;
let note = id && db.notes.note(id).data;
- eSendEvent("loadingNote", note);
eSendEvent("webview_reset");
+ setTimeout(() => eSendEvent("loadingNote", note), 1);
MMKV.removeItem("shareExtensionOpened");
}
} catch (e) {
diff --git a/apps/mobile/app/screens/editor/tiptap/use-editor.ts b/apps/mobile/app/screens/editor/tiptap/use-editor.ts
index 3cb82af4f..9e31d3692 100644
--- a/apps/mobile/app/screens/editor/tiptap/use-editor.ts
+++ b/apps/mobile/app/screens/editor/tiptap/use-editor.ts
@@ -580,22 +580,21 @@ export const useEditor = (
const onReady = useCallback(async () => {
if (!(await isEditorLoaded(editorRef, sessionIdRef.current))) {
- overlay(true);
- setLoading(true);
+ eSendEvent("webview_reset");
} else {
isDefaultEditor && restoreEditorState();
}
- }, [overlay, isDefaultEditor, restoreEditorState]);
+ }, [isDefaultEditor, restoreEditorState]);
useEffect(() => {
state.current.saveCount = 0;
- async () => {
+ (async () => {
await commands.setSessionId(sessionIdRef.current);
if (sessionIdRef.current) {
if (!state.current?.ready) return;
await onReady();
}
- };
+ })();
}, [sessionId, loading, commands, onReady]);
const onLoad = useCallback(async () => {
@@ -636,6 +635,7 @@ export const useEditor = (
saveContent,
onContentChanged,
editorId: editorId,
- markImageLoaded
+ markImageLoaded,
+ overlay
};
};
diff --git a/apps/mobile/app/screens/editor/wrapper.js b/apps/mobile/app/screens/editor/wrapper.js
index 6b30acc11..b2671720a 100644
--- a/apps/mobile/app/screens/editor/wrapper.js
+++ b/apps/mobile/app/screens/editor/wrapper.js
@@ -51,6 +51,7 @@ export const EditorWrapper = ({ width }) => {
if (editorState().movedAway) return;
if (state === "active") {
editorController.current.onReady();
+ editorController.current.overlay(false);
}
};
diff --git a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx b/apps/mobile/app/screens/settings/editor/tool-sheet.tsx
index acc58f7d6..4e66fd419 100644
--- a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx
+++ b/apps/mobile/app/screens/settings/editor/tool-sheet.tsx
@@ -20,8 +20,6 @@ along with this program. If not, see .
import { ToolId } from "@notesnook/editor/dist/toolbar";
import React, { RefObject } from "react";
import { View } from "react-native";
-import ActionSheet from "react-native-actions-sheet";
-import { ScrollView } from "react-native-gesture-handler";
import { PressableButton } from "../../../components/ui/pressable";
import { SvgView } from "../../../components/ui/svg";
import Paragraph from "../../../components/ui/typography/paragraph";
@@ -34,13 +32,14 @@ import {
getToolIcon,
getUngroupedTools
} from "./toolbar-definition";
+import { ActionSheetRef, ScrollView } from "react-native-actions-sheet";
export default function ToolSheet({
group,
fwdRef
}: {
group: DraggableItem;
- fwdRef: RefObject;
+ fwdRef: RefObject;
}) {
const colors = useThemeStore((state) => state.colors);
const data = useDragState((state) => state.data);
@@ -50,6 +49,7 @@ export default function ToolSheet({
(item: ToolId) => {
const tool = findToolById(item);
const iconSvgString = tool ? getToolIcon(tool.icon as ToolId) : null;
+ if (item === "none") return;
return (
- {
- fwdRef.current?.handleChildScrollEnd();
- }}
- nestedScrollEnabled={true}
- >
+
{!ungrouped || ungrouped.length === 0 ? (
e.preventDefault()}
>
{typeof selectedItem === "string" ? (
-
+
{selectedItem}
) : (