Skip to content

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

mobile: update wording

ammarahm-edf691d113d20b
diff --git a/apps/mobile/app/hooks/use-actions.js b/apps/mobile/app/hooks/use-actions.js
index 9d7e71d59..70da564bf 100644
--- a/apps/mobile/app/hooks/use-actions.js
+++ b/apps/mobile/app/hooks/use-actions.js
@@ -780,8 +780,8 @@ export const useActions = ({ close = () => null, item }) => {
id: "default-notebook",
title:
defaultNotebook?.id === item.id
- ? "Remove as default notebook"
- : "Set as default notebook",
+ ? "Remove as default"
+ : "Set as default",
hidden: item.type !== "notebook",
icon: "notebook",
func: async () => {
@@ -789,30 +789,39 @@ export const useActions = ({ close = () => null, item }) => {
await db.settings.setDefaultNotebook();
setDefaultNotebook();
} else {
- await db.settings.setDefaultNotebook(item);
- setDefaultNotebook(item);
+ const notebook = {
+ id: item.id
+ };
+ await db.settings.setDefaultNotebook(notebook);
+ setDefaultNotebook(notebook);
}
+ close();
},
- on: defaultNotebook?.id === item.id
+ on: defaultNotebook?.topic ? false : defaultNotebook?.id === item.id
},
{
id: "default-topic",
title:
defaultNotebook?.id === item.id
- ? "Remove as default topic"
- : "Set as default topic",
+ ? "Remove as default"
+ : "Set as default",
hidden: item.type !== "topic",
icon: "bookmark",
func: async () => {
- if (defaultNotebook?.id === item.id) {
+ if (defaultNotebook?.topic === item.id) {
await db.settings.setDefaultNotebook();
setDefaultNotebook();
} else {
- await db.settings.setDefaultNotebook(item);
- setDefaultNotebook(item);
+ const notebook = {
+ id: item.notebookId,
+ topic: item.id
+ };
+ await db.settings.setDefaultNotebook(notebook);
+ setDefaultNotebook(notebook);
}
+ close();
},
- on: defaultNotebook?.id === item.id
+ on: defaultNotebook?.topic === item.id
},
{
id: "disable-reminder",
diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsx
index 728790136..349d8544a 100644
--- a/apps/mobile/app/screens/settings/settings-data.tsx
+++ b/apps/mobile/app/screens/settings/settings-data.tsx
@@ -548,8 +548,8 @@ export const settingsGroups: SettingSection[] = [
},
{
id: "default-notebook",
- name: "Clear default notebook",
- description: "Clear the default notebook for new notes",
+ name: "Clear default notebook/topic",
+ description: "Clear the default notebook/topic for new notes",
modifer: () => {
db.settings?.setDefaultNotebook(undefined);
},