From b1c6420fdf706953d5ea2068db767d1b1427d582 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 3 Jun 2020 10:39:47 +0500 Subject: [PATCH] open Premium Dialog iOS --- .../src/components/ActionSheetComponent/index.js | 12 ++++-------- apps/mobile/src/components/DialogManager/index.js | 4 ++++ apps/mobile/src/components/Premium/PremiumDialog.js | 13 +++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js index 940b59d0f..59f8f38af 100644 --- a/apps/mobile/src/components/ActionSheetComponent/index.js +++ b/apps/mobile/src/components/ActionSheetComponent/index.js @@ -301,8 +301,7 @@ export const ActionSheetComponent = ({ icon: 'tag-outline', func: async () => { if (!premiumUser) { - eSendEvent(eOpenPremiumDialog); - close(); + close('premium'); return; } @@ -324,8 +323,7 @@ export const ActionSheetComponent = ({ icon: 'star', func: async () => { if (!premiumUser) { - eSendEvent(eOpenPremiumDialog); - close(); + close('premium'); return; } if (!note.id) return; @@ -346,8 +344,7 @@ export const ActionSheetComponent = ({ icon: 'shield', func: () => { if (!premiumUser) { - eSendEvent(eOpenPremiumDialog); - close(); + close('premium'); return; } if (!note.id) return; @@ -833,8 +830,7 @@ export const ActionSheetComponent = ({ { if (!premiumUser) { - eSendEvent(eOpenPremiumDialog); - close(); + close('premium'); return; } tagsInputRef.current?.focus(); diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js index 70a4c6bf6..a9a5e2aff 100644 --- a/apps/mobile/src/components/DialogManager/index.js +++ b/apps/mobile/src/components/DialogManager/index.js @@ -4,6 +4,7 @@ import { eSubscribeEvent, eUnSubscribeEvent, openVault, + eSendEvent, } from '../../services/eventManager'; import { eCloseActionSheet, @@ -252,6 +253,9 @@ export class DialogManager extends Component { moveNoteEvent(); break; } + case "premium": { + eSendEvent(eOpenPremiumDialog); + } } } this.show = null; diff --git a/apps/mobile/src/components/Premium/PremiumDialog.js b/apps/mobile/src/components/Premium/PremiumDialog.js index 82cceaccf..d4dd4b154 100644 --- a/apps/mobile/src/components/Premium/PremiumDialog.js +++ b/apps/mobile/src/components/Premium/PremiumDialog.js @@ -103,12 +103,13 @@ class PremiumDialog extends React.Component { item} renderItem={({item, index}) => ( - + - Buy Now + BUY NOW @@ -182,7 +183,7 @@ class PremiumDialog extends React.Component { color: 'white', textAlign: 'center', }}> - Start your 14 day trial today + Start your 14 day trial