A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: use notifee without gms libs
ammarahm-ed30a5882b9c10
diff --git a/apps/mobile/app/components/header/title.js b/apps/mobile/app/components/header/title.jsindex 9b2fa206a..bcffcf260 100644--- a/apps/mobile/app/components/header/title.js+++ b/apps/mobile/app/components/header/title.js@@ -100,7 +100,6 @@ export const Title = () => {if (!isTopic) return;Notebook.navigate(notebook, true);}- console.log(currentScreen);return (<Viewstyle={{diff --git a/apps/mobile/native/metro.config.js b/apps/mobile/native/metro.config.jsindex c4e69c935..a2adab622 100644--- a/apps/mobile/native/metro.config.js+++ b/apps/mobile/native/metro.config.js@@ -23,6 +23,7 @@ module.exports = {"react": path.join(__dirname, "../node_modules/react"),"react-dom": path.join(__dirname, "../node_modules/react-dom"),"@notesnook": path.join(__dirname, "../../../packages"),+ "@notifee/react-native": path.join(__dirname, "../node_modules/@ammarahmed/notifee-react-native")}},transformer: {diff --git a/apps/mobile/native/package.json b/apps/mobile/native/package.jsonindex afa9cd874..76330aff9 100644--- a/apps/mobile/native/package.json+++ b/apps/mobile/native/package.json@@ -53,7 +53,7 @@"rn-fetch-blob": "^0.12.0","react-native-gzip":"1.0.0","@shopify/flash-list":"1.4.0",- "@notifee/react-native": "7.1.0",+ "@ammarahmed/notifee-react-native": "7.3.1","react-native-modal-datetime-picker":"14.0.0","@react-native-community/datetimepicker":"6.6.0","react-native-date-picker": "4.2.6"diff --git a/apps/mobile/native/webpack.config.cjs b/apps/mobile/native/webpack.config.cjsindex 9db7ceda9..4be00ee85 100644--- a/apps/mobile/native/webpack.config.cjs+++ b/apps/mobile/native/webpack.config.cjs@@ -86,6 +86,7 @@ module.exports = (env) => {"@notesnook": path.join(__dirname, "../../../packages"),"@streetwriters/showdown": path.join(__dirname, "../node_modules/@streetwriters/showdown"),"qclone": path.join(__dirname, "../node_modules/qclone"),+ "@notifee/react-native": path.join(__dirname, "../node_modules/@ammarahmed/notifee-react-native")},},/**diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex e812b80fa..cdc75779c 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -60,9 +60,9 @@"version": "1.0.0","license": "GPL-3.0-or-later","dependencies": {+ "@ammarahmed/notifee-react-native": "7.3.1","@ammarahmed/react-native-sodium": "1.2.0","@callstack/repack": "^3.0.0",- "@notifee/react-native": "7.1.0","@react-native-clipboard/clipboard": "^1.9.0","@react-native-community/checkbox": "^0.5.8","@react-native-community/datetimepicker": "6.6.0",@@ -154,6 +154,14 @@"webpack": "^5.74.0"}},+ "node_modules/@ammarahmed/notifee-react-native": {+ "version": "7.3.1",+ "resolved": "https://registry.npmjs.org/@ammarahmed/notifee-react-native/-/notifee-react-native-7.3.1.tgz",+ "integrity": "sha512-kzBDw2NAt9kGD0CJ193JME4bS4uQolY+UubGiTnJwHfaLH7dFNju6RC15/u8tzG59ebDuCalkMLr+rAONtg2Rw==",+ "peerDependencies": {+ "react-native": "*"+ }+ },"node_modules/@ammarahmed/react-native-sodium": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@ammarahmed/react-native-sodium/-/react-native-sodium-1.2.0.tgz",@@ -3996,14 +4004,6 @@"resolved": "native","link": true},- "node_modules/@notifee/react-native": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/@notifee/react-native/-/react-native-7.1.0.tgz",- "integrity": "sha512-FmYplZ1Bxua2q8u+W3RmVx85R32DWeMQGfzvu8O9w7bZQwMtvmQROjfyMSIOMVCQw6fSA7zmMaikC+W4LjLMHQ==",- "peerDependencies": {- "react-native": "*"- }- },"node_modules/@otplib/core": {"version": "12.0.1","resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",@@ -21519,6 +21519,11 @@}},"dependencies": {+ "@ammarahmed/notifee-react-native": {+ "version": "7.3.1",+ "resolved": "https://registry.npmjs.org/@ammarahmed/notifee-react-native/-/notifee-react-native-7.3.1.tgz",+ "integrity": "sha512-kzBDw2NAt9kGD0CJ193JME4bS4uQolY+UubGiTnJwHfaLH7dFNju6RC15/u8tzG59ebDuCalkMLr+rAONtg2Rw=="+ },"@ammarahmed/react-native-sodium": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@ammarahmed/react-native-sodium/-/react-native-sodium-1.2.0.tgz",@@ -24315,6 +24320,7 @@"@notesnook/mobile-native": {"version": "file:native","requires": {+ "@ammarahmed/notifee-react-native": "7.3.1","@ammarahmed/react-native-sodium": "1.2.0","@babel/core": "^7.12.9","@babel/eslint-parser": "^7.16.5",@@ -24322,7 +24328,6 @@"@babel/preset-env": "^7.18.6","@babel/runtime": "^7.12.5","@callstack/repack": "^3.0.0",- "@notifee/react-native": "7.1.0","@react-native-clipboard/clipboard": "^1.9.0","@react-native-community/checkbox": "^0.5.8","@react-native-community/datetimepicker": "6.6.0",@@ -24407,11 +24412,6 @@"webpack": "^5.74.0"}},- "@notifee/react-native": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/@notifee/react-native/-/react-native-7.1.0.tgz",- "integrity": "sha512-FmYplZ1Bxua2q8u+W3RmVx85R32DWeMQGfzvu8O9w7bZQwMtvmQROjfyMSIOMVCQw6fSA7zmMaikC+W4LjLMHQ=="- },"@otplib/core": {"version": "12.0.1","resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",diff --git a/apps/mobile/patches/@ammarahmed+notifee-react-native+7.3.1.patch b/apps/mobile/patches/@ammarahmed+notifee-react-native+7.3.1.patchnew file mode 100644index 000000000..08f53349d--- /dev/null+++ b/apps/mobile/patches/@ammarahmed+notifee-react-native+7.3.1.patch@@ -0,0 +1,13 @@+diff --git a/node_modules/@ammarahmed/notifee-react-native/dist/version.js b/node_modules/@ammarahmed/notifee-react-native/dist/version.js+new file mode 100644+index 0000000..5fec2e3+--- /dev/null++++ b/node_modules/@ammarahmed/notifee-react-native/dist/version.js+@@ -0,0 +1,6 @@++"use strict";++Object.defineProperty(exports, "__esModule", { value: true });++exports.version = void 0;++// Generated by genversion.++exports.version = '7.3.1';++//# sourceMappingURL=version.js.map+\ No newline at end of filediff --git a/apps/mobile/patches/@notifee+react-native+7.1.0.patch b/apps/mobile/patches/@notifee+react-native+7.1.0.patchdeleted file mode 100644index c1fadcad7..000000000--- a/apps/mobile/patches/@notifee+react-native+7.1.0.patch+++ /dev/null@@ -1,79 +0,0 @@-diff --git a/node_modules/@notifee/react-native/dist/NotifeeApiModule.js b/node_modules/@notifee/react-native/dist/NotifeeApiModule.js-index f9f151a..d31b0d1 100644---- a/node_modules/@notifee/react-native/dist/NotifeeApiModule.js-+++ b/node_modules/@notifee/react-native/dist/NotifeeApiModule.js-@@ -275,6 +275,7 @@ class NotifeeApiModule extends NotifeeNativeModule_1.default {- return Promise.resolve();- };- createTriggerNotification = (notification, trigger) => {-+- let options;- let triggerOptions;- try {-diff --git a/node_modules/@notifee/react-native/dist/types/Trigger.d.ts b/node_modules/@notifee/react-native/dist/types/Trigger.d.ts-index 9907278..89d2116 100644---- a/node_modules/@notifee/react-native/dist/types/Trigger.d.ts-+++ b/node_modules/@notifee/react-native/dist/types/Trigger.d.ts-@@ -55,7 +55,8 @@ export declare enum RepeatFrequency {- NONE = -1,- HOURLY = 0,- DAILY = 1,-- WEEKLY = 2-+ WEEKLY = 2,-+ MONTHLY = 3- }- /**- * Interface for building a trigger that repeats at a specified interval.-diff --git a/node_modules/@notifee/react-native/dist/types/Trigger.js b/node_modules/@notifee/react-native/dist/types/Trigger.js-index 6fe5153..0043d15 100644---- a/node_modules/@notifee/react-native/dist/types/Trigger.js-+++ b/node_modules/@notifee/react-native/dist/types/Trigger.js-@@ -12,6 +12,7 @@ var RepeatFrequency;- RepeatFrequency[RepeatFrequency["HOURLY"] = 0] = "HOURLY";- RepeatFrequency[RepeatFrequency["DAILY"] = 1] = "DAILY";- RepeatFrequency[RepeatFrequency["WEEKLY"] = 2] = "WEEKLY";-+ RepeatFrequency[RepeatFrequency["MONTHLY"] = 3] = "MONTHLY";- })(RepeatFrequency = exports.RepeatFrequency || (exports.RepeatFrequency = {}));- /**- * An interface representing the different units of time which can be used with `IntervalTrigger.timeUnit`.-diff --git a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.h b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.h-index 9ae89e3..ecc7afa 100644---- a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.h-+++ b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.h-@@ -41,7 +41,8 @@ typedef NS_ENUM(NSInteger, NotifeeCoreTriggerType) {- typedef NS_ENUM(NSInteger, NotifeeCoreRepeatFrequency) {- NotifeeCoreRepeatFrequencyHourly = 0,- NotifeeCoreRepeatFrequencyDaily = 1,-- NotifeeCoreRepeatFrequencyWeekly = 2-+ NotifeeCoreRepeatFrequencyWeekly = 2,-+ NotifeeCoreRepeatFrequencyMonthly = 3- };-- @interface NotifeeCoreUtil : NSObject-diff --git a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.m b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.m-index e489445..71b360e 100644---- a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.m-+++ b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCoreUtil.m-@@ -337,6 +337,10 @@ + (UNNotificationTrigger *)timestampTriggerFromDictionary:(NSDictionary *)trigge- // match by day, hour, minute, and second- calendarUnit =- NSCalendarUnitWeekday | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;-+ } else if (repeatFrequency == NotifeeCoreRepeatFrequencyMonthly) {-+ // match by day, hour, minute, and second-+ calendarUnit =-+ NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;- } else {- NSLog(@"NotifeeCore: Failed to parse TimestampTrigger with unknown "- @"repeatFrequency: %ld",-diff --git a/node_modules/@notifee/react-native/src/types/Trigger.ts b/node_modules/@notifee/react-native/src/types/Trigger.ts-index 6c0760a..5ad765b 100644---- a/node_modules/@notifee/react-native/src/types/Trigger.ts-+++ b/node_modules/@notifee/react-native/src/types/Trigger.ts-@@ -60,6 +60,7 @@ export enum RepeatFrequency {- HOURLY = 0,- DAILY = 1,- WEEKLY = 2,-+ MONTHLY = 3- }-- /**diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.jsonindex 49bc659b3..7475dfd95 100644--- a/apps/mobile/tsconfig.json+++ b/apps/mobile/tsconfig.json@@ -9,7 +9,8 @@"maxNodeModuleJsDepth": 5,"types": ["node", "jest", "detox"],"paths": {- "@notesnook/*": ["../../packages"]+ "@notesnook/*": ["../../packages"],+ "@notifee/react-native": ["./node_modules/@ammarahmed/notifee-react-native"]},"incremental": true},