diff --git a/apps/mobile/app/components/attachments/attachment-item.tsx b/apps/mobile/app/components/attachments/attachment-item.tsx
index 89774d281..357e846ce 100644
--- a/apps/mobile/app/components/attachments/attachment-item.tsx
+++ b/apps/mobile/app/components/attachments/attachment-item.tsx
@@ -67,9 +67,8 @@ export const AttachmentItem = ({
Actions.present(attachment, setAttachments, context);
};
- return (hideWhenNotDownloading &&
- (!currentProgress || !currentProgress.value)) ||
- !attachment ? null : (
+ return hideWhenNotDownloading &&
+ (!currentProgress || !currentProgress.value) ? null : (
-
-
-
-
-
- {getFileExtension(attachment.filename).toUpperCase()}
-
-
-
-
-
- {attachment.filename}
-
-
- {!hideWhenNotDownloading ? (
-
- {formatBytes(attachment.size)}{" "}
- {currentProgress?.type
- ? "(" + currentProgress.type + "ing - tap to cancel)"
- : ""}
-
- ) : null}
-
-
-
- {currentProgress ? (
- {
- if (encryption || !pressable) return;
- db.fs().cancel(attachment.metadata.hash);
- setCurrentProgress(undefined);
- }}
- style={{
- justifyContent: "center",
- marginLeft: 5,
- marginTop: 5,
- marginRight: -5
- }}
- >
- (progress * 100).toFixed(0)}
- borderWidth={0}
- thickness={2}
- />
-
- ) : (
+ {!attachment ? null : (
<>
- {attachment.failed ? (
-
- ) : null}
+
+
+
+
+
+ {getFileExtension(attachment.filename).toUpperCase()}
+
+
+
+
+
+ {attachment.filename}
+
+
+ {!hideWhenNotDownloading ? (
+
+ {formatBytes(attachment.size)}{" "}
+ {currentProgress?.type
+ ? "(" + currentProgress.type + "ing - tap to cancel)"
+ : ""}
+
+ ) : null}
+
+
+
+ {currentProgress ? (
+ {
+ if (encryption || !pressable) return;
+ db.fs().cancel(attachment.hash);
+ setCurrentProgress(undefined);
+ }}
+ style={{
+ justifyContent: "center",
+ marginLeft: 5,
+ marginTop: 5,
+ marginRight: -5
+ }}
+ >
+ (progress * 100).toFixed(0)}
+ borderWidth={0}
+ thickness={2}
+ />
+
+ ) : (
+ <>
+ {attachment.failed ? (
+
+ ) : null}
+ >
+ )}
>
)}
diff --git a/apps/mobile/app/components/note-history/index.tsx b/apps/mobile/app/components/note-history/index.tsx
index 962a6c2ae..5c0c92841 100644
--- a/apps/mobile/app/components/note-history/index.tsx
+++ b/apps/mobile/app/components/note-history/index.tsx
@@ -78,28 +78,30 @@ const HistoryItem = ({
}, []);
return (
- item && (
- {
- if (!item) return;
- preview(item);
- }}
- customStyle={{
- justifyContent: "space-between",
- alignItems: "center",
- paddingHorizontal: 12,
- height: 45,
- marginBottom: 10,
- flexDirection: "row"
- }}
- >
- {getDate(item.dateCreated, item.dateModified)}
-
- {getTimeAgo(item.dateModified)}
-
-
- )
+ {
+ if (!item) return;
+ preview(item);
+ }}
+ customStyle={{
+ justifyContent: "space-between",
+ alignItems: "center",
+ paddingHorizontal: 12,
+ height: 45,
+ marginBottom: 10,
+ flexDirection: "row"
+ }}
+ >
+ {!item ? null : (
+ <>
+ {getDate(item.dateCreated, item.dateModified)}
+
+ {getTimeAgo(item.dateModified)}
+
+ >
+ )}
+
);
};
diff --git a/apps/mobile/app/components/sheets/move-notes/movenote.tsx b/apps/mobile/app/components/sheets/move-notes/movenote.tsx
index a115884b0..e8dd469ba 100644
--- a/apps/mobile/app/components/sheets/move-notes/movenote.tsx
+++ b/apps/mobile/app/components/sheets/move-notes/movenote.tsx
@@ -21,7 +21,7 @@ import { VirtualizedGrouping } from "@notesnook/core";
import { Note, Notebook } from "@notesnook/core/dist/types";
import { useThemeColors } from "@notesnook/theme";
import React, { RefObject, useEffect, useState } from "react";
-import { Platform, View, useWindowDimensions } from "react-native";
+import { View } from "react-native";
import { ActionSheetRef } from "react-native-actions-sheet";
import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList";
import { db } from "../../../common/database";
@@ -51,9 +51,14 @@ export const MoveNotes = ({
const { colors } = useThemeColors();
const currentNotebook = notebook;
const selectionCount = useItemSelectionStore(
- (state) => Object.keys(state.selection)?.length > 0
+ (state) =>
+ Object.keys(state.selection).filter(
+ (k) =>
+ state.initialState?.[k] !== "selected" &&
+ state.selection[k] !== "deselected"
+ )?.length > 0
);
- const { height } = useWindowDimensions();
+
const [notes, setNotes] = useState>();
useEffect(() => {
@@ -90,8 +95,10 @@ export const MoveNotes = ({
@@ -116,9 +123,11 @@ export const MoveNotes = ({
}
+ estimatedItemSize={50}
data={notes?.placeholders}
renderItem={renderItem}
/>
+
{selectionCount ? (