Skip to content

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

update ActionSheet method

ammarahm-edecae9f4ee73e
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 07ac9cd71..ee325b6f7 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -1,6 +1,4 @@
import React, {Component, createRef} from 'react';
-import {Platform} from 'react-native';
-import {DDS} from '../../services/DeviceDetection';
import {
eSendEvent,
eSubscribeEvent,
@@ -8,11 +6,9 @@ import {
openVault,
} from '../../services/EventManager';
import {dWidth} from '../../utils';
-import {hexToRGBA} from '../../utils/ColorUtils';
import {
eCloseActionSheet,
eCloseAddNotebookDialog,
- eCloseAddTopicDialog,
eCloseLoginDialog,
eCloseMoveNoteDialog,
eClosePremiumDialog,
@@ -20,17 +16,15 @@ import {
eOnLoadNote,
eOpenActionSheet,
eOpenAddNotebookDialog,
- eOpenAddTopicDialog,
eOpenExportDialog,
eOpenLoginDialog,
eOpenMoveNoteDialog,
eOpenPremiumDialog,
eOpenSimpleDialog,
} from '../../utils/Events';
-import ActionSheet from '../ActionSheet';
import {ActionSheetComponent} from '../ActionSheetComponent';
import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
-import {GetPremium, translatePrem} from '../ActionSheetComponent/GetPremium';
+import {translatePrem} from '../ActionSheetComponent/GetPremium';
import {AddNotebookDialog} from '../AddNotebookDialog';
import {AddTopicDialog} from '../AddTopicDialog';
import {Dialog} from '../Dialog';
@@ -90,13 +84,13 @@ export class DialogManager extends Component {
actionSheetVisible: true,
},
() => {
- this.actionSheet.current?._setModalVisible();
+ this.actionSheet.current?.setModalVisible();
},
);
};
_hideActionSheet = () => {
- this.actionSheet.current?._setModalVisible(false);
+ this.actionSheet.current?.setModalVisible(false);
};
_showMoveNote = () => {
@@ -330,7 +324,7 @@ export class DialogManager extends Component {
if (value) {
this.show = value;
}
- this.actionSheet.current?._setModalVisible();
+ this.actionSheet.current?.setModalVisible();
}}
/>
</ActionSheetWrapper>
diff --git a/apps/mobile/src/components/Premium/PendingDialog.js b/apps/mobile/src/components/Premium/PendingDialog.js
index 8139964c0..52ec2daba 100644
--- a/apps/mobile/src/components/Premium/PendingDialog.js
+++ b/apps/mobile/src/components/Premium/PendingDialog.js
@@ -20,7 +20,7 @@ class PendingDialog extends React.Component {
}
async open() {
- actionSheet.current?._setModalVisible(true);
+ actionSheet.current?.setModalVisible(true);
let u = await db.user.fetchUser();
this.setState({
user: u && u.Id ? u : null,
@@ -28,7 +28,7 @@ class PendingDialog extends React.Component {
}
close() {
- actionSheet.current?._setModalVisible(false);
+ actionSheet.current?.setModalVisible(false);
this.setState({
user: null,
});
diff --git a/apps/mobile/src/components/Premium/PremiumDialog.js b/apps/mobile/src/components/Premium/PremiumDialog.js
index 53e3c028d..3e46101c8 100644
--- a/apps/mobile/src/components/Premium/PremiumDialog.js
+++ b/apps/mobile/src/components/Premium/PremiumDialog.js
@@ -35,13 +35,13 @@ class PremiumDialog extends React.Component {
visible: true,
},
() => {
- this.actionSheetRef.current?._setModalVisible(true);
+ this.actionSheetRef.current?.setModalVisible(true);
},
);
}
close() {
- this.actionSheetRef.current?._setModalVisible(false);
+ this.actionSheetRef.current?.setModalVisible(false);
}
async getSkus() {
diff --git a/apps/mobile/src/components/ProgressDialog/index.js b/apps/mobile/src/components/ProgressDialog/index.js
index ba43fe31e..39ce49258 100644
--- a/apps/mobile/src/components/ProgressDialog/index.js
+++ b/apps/mobile/src/components/ProgressDialog/index.js
@@ -33,7 +33,7 @@ const ProgressDialog = () => {
setDialogData(data);
setVisible(true);
await sleep(1);
- actionSheetRef.current?._setModalVisible(true);
+ actionSheetRef.current?.setModalVisible(true);
};
const close = () => {
diff --git a/apps/mobile/src/components/RecoveryKeyDialog/index.js b/apps/mobile/src/components/RecoveryKeyDialog/index.js
index 0def49bc4..91285287b 100644
--- a/apps/mobile/src/components/RecoveryKeyDialog/index.js
+++ b/apps/mobile/src/components/RecoveryKeyDialog/index.js
@@ -46,13 +46,13 @@ class RecoveryKeyDialog extends React.Component {
visible: true,
},
() => {
- this.actionSheetRef.current?._setModalVisible(true);
+ this.actionSheetRef.current?.setModalVisible(true);
},
);
};
close = () => {
- this.actionSheetRef.current?._setModalVisible(false);
+ this.actionSheetRef.current?.setModalVisible(false);
sleep(200).then(() => {
this.setState({
visible: false,
diff --git a/apps/mobile/src/components/RestoreDialog/index.js b/apps/mobile/src/components/RestoreDialog/index.js
index 3de8fc7cb..83b5150f2 100644
--- a/apps/mobile/src/components/RestoreDialog/index.js
+++ b/apps/mobile/src/components/RestoreDialog/index.js
@@ -38,7 +38,7 @@ const RestoreDialog = () => {
const open = async () => {
setVisible(true);
await sleep(30);
- actionSheetRef.current?._setModalVisible(true);
+ actionSheetRef.current?.setModalVisible(true);
};
const close = () => {
diff --git a/apps/mobile/src/components/SortDialog/index.js b/apps/mobile/src/components/SortDialog/index.js
index 9cc6bc5f6..ac9736c0e 100644
--- a/apps/mobile/src/components/SortDialog/index.js
+++ b/apps/mobile/src/components/SortDialog/index.js
@@ -34,7 +34,7 @@ class SortDialog extends React.Component {
visible: true,
},
async () => {
- actionSheet.current?._setModalVisible(true);
+ actionSheet.current?.setModalVisible(true);
await this.getSettings();
},
);
@@ -48,7 +48,7 @@ class SortDialog extends React.Component {
}
close() {
- actionSheet.current?._setModalVisible(false);
+ actionSheet.current?.setModalVisible(false);
sleep(200).then(() => {
this.setState({
visible: false,