Merge branch 'mobile-fix-crash-on-move-notebook' into beta

This commit is contained in:
Ammar Ahmed
2025-07-15 10:57:51 +05:00
5 changed files with 18 additions and 11 deletions

View File

@@ -197,16 +197,6 @@ export const SelectionHeader = React.memo(
}
]
: [
{
title: strings.move(),
onPress: async () => {
const ids = selectedItemsList;
const notebooks = await db.notebooks.all.items(ids);
MoveNotebook.present(notebooks);
},
visible: renderedInRoute === "Notebooks",
icon: "arrow-right-bold-box-outline"
},
{
title: strings.manageTags(),
onPress: async () => {

View File

@@ -211,6 +211,14 @@ const TabBar = (
const ids = useSideMenuNotebookSelectionStore
.getState()
.getSelectedItemIds();
if (!ids.length) {
ToastManager.show({
context: "local",
type: "error",
message: strings.noNotebooksSelectedToMove()
});
return;
}
const notebooks = await db.notebooks.all.items(ids);
Navigation.navigate("MoveNotebook", {
selectedNotebooks: notebooks

View File

@@ -3956,6 +3956,10 @@ msgstr "No links found"
msgid "No note history available for this device."
msgstr "No note history available for this device."
#: src/strings.ts:2489
msgid "No notebooks selected to move"
msgstr "No notebooks selected to move"
#: src/strings.ts:202
msgid "No one can view this {type} except you."
msgstr "No one can view this {type} except you."

View File

@@ -3936,6 +3936,10 @@ msgstr ""
msgid "No note history available for this device."
msgstr ""
#: src/strings.ts:2489
msgid "No notebooks selected to move"
msgstr ""
#: src/strings.ts:202
msgid "No one can view this {type} except you."
msgstr ""

View File

@@ -2488,5 +2488,6 @@ Use this if changes from other devices are not appearing on this device. This wi
t`Select a notebook to move this notebook into, or unselect to move it to the root level.`,
words: () => t`Words`,
characters: () => t`Characters`,
paragraphs: () => t`Paragraphs`
paragraphs: () => t`Paragraphs`,
noNotebooksSelectedToMove: () => t`No notebooks selected to move`
};