Skip to content

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

mobile: add app shortcut for creating reminders

kashaf-ansari-dev64943647f815
diff --git a/apps/mobile/app/hooks/use-shortcut-manager.ts b/apps/mobile/app/hooks/use-shortcut-manager.ts
index cb3ff2fee..011c463a8 100644
--- a/apps/mobile/app/hooks/use-shortcut-manager.ts
+++ b/apps/mobile/app/hooks/use-shortcut-manager.ts
@@ -36,6 +36,12 @@ const defaultShortcuts: ShortcutItem[] = [
title: strings.createNewNote(),
shortTitle: strings.newNote(),
iconName: Platform.OS === "android" ? "ic_newnote" : "plus"
+ },
+ {
+ type: "notesnook.action.newreminder",
+ title: strings.setReminder(),
+ shortTitle: strings.newReminder(),
+ iconName: Platform.OS === "android" ? "ic_newnote" : "plus"
}
];
export const useShortcutManager = ({
diff --git a/apps/mobile/app/navigation/fluid-panels-view.tsx b/apps/mobile/app/navigation/fluid-panels-view.tsx
index 2ef17c040..9cb659e8a 100644
--- a/apps/mobile/app/navigation/fluid-panels-view.tsx
+++ b/apps/mobile/app/navigation/fluid-panels-view.tsx
@@ -67,6 +67,7 @@ import { valueLimiter } from "../utils/functions";
import { fluidTabsRef } from "../utils/global-refs";
import { AppNavigationStack } from "./navigation-stack";
import type { PaneWidths } from "../screens/editor/wrapper";
+import AddReminder from "../screens/add-reminder";
const MOBILE_SIDEBAR_SIZE = 0.85;
@@ -131,6 +132,11 @@ export const FluidPanelsView = React.memo(
300
);
}
+ if (item?.type === "notesnook.action.newreminder") {
+ setTimeout(() => {
+ AddReminder.present();
+ }, 1000);
+ }
}
});