diff --git a/apps/mobile/app/components/side-menu/notebook-item.tsx b/apps/mobile/app/components/side-menu/notebook-item.tsx index eefa4d322..0e0010425 100644 --- a/apps/mobile/app/components/side-menu/notebook-item.tsx +++ b/apps/mobile/app/components/side-menu/notebook-item.tsx @@ -79,6 +79,7 @@ export const NotebookItem = ({ useEffect(() => { const onNotebookUpdate = (id?: string) => { if (id && id !== notebook.id) return; + getTotalNotesRef.current([item.notebook.id]); onItemUpdate(id); }; @@ -86,7 +87,7 @@ export const NotebookItem = ({ return () => { eUnSubscribeEvent(eOnNotebookUpdated, onNotebookUpdate); }; - }, [notebook.id, onItemUpdate]); + }, [item.notebook.id, notebook.id, onItemUpdate]); return ( { diff --git a/apps/mobile/app/screens/move-notes/index.tsx b/apps/mobile/app/screens/move-notes/index.tsx index bd6a4cd35..fe208c11f 100644 --- a/apps/mobile/app/screens/move-notes/index.tsx +++ b/apps/mobile/app/screens/move-notes/index.tsx @@ -21,8 +21,7 @@ import { Note, Notebook, VirtualizedGrouping } from "@notesnook/core"; import { strings } from "@notesnook/intl"; import { useThemeColors } from "@notesnook/theme"; import React, { useEffect, useRef, useState } from "react"; -import { ActivityIndicator, TextInput, View } from "react-native"; -import { FlashList } from "react-native-actions-sheet/dist/src/views/FlashList"; +import { ActivityIndicator, FlatList, TextInput, View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { db } from "../../common/database"; import { FloatingButton } from "../../components/container/floating-button"; @@ -117,12 +116,12 @@ export const MoveNotes = (props: NavigationProps<"MoveNotes">) => { backgroundColor: colors.primary.background }} > -
+
@@ -136,7 +135,12 @@ export const MoveNotes = (props: NavigationProps<"MoveNotes">) => { testID="search-input" fwdRef={inputRef} wrapperStyle={{ - marginBottom: 0 + marginBottom: 0, + flexShrink: 1 + }} + flexGrow={0} + containerStyle={{ + flexGrow: 0 }} autoCapitalize="none" onChangeText={(v) => { @@ -153,7 +157,7 @@ export const MoveNotes = (props: NavigationProps<"MoveNotes">) => { }} /> - ) => { )} } - estimatedItemSize={50} + style={{ + flexGrow: 1 + }} data={loading ? [] : notes?.placeholders} renderItem={renderItem} />