Skip to content

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

align to center

ammarahm-ed6d78b0521a64
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js
index ef8eb1f73..6d03c1c76 100644
--- a/apps/mobile/src/components/ActionSheetComponent/index.js
+++ b/apps/mobile/src/components/ActionSheetComponent/index.js
@@ -1,51 +1,53 @@
-import React, { useEffect, useState } from 'react';
+import React, {useEffect, useState} from 'react';
import {
ActivityIndicator,
Clipboard,
- Dimensions, Keyboard, ScrollView, TouchableOpacity,
- View
+ Dimensions,
+ InteractionManager,
+ Keyboard,
+ ScrollView,
+ TouchableOpacity,
+ View,
} from 'react-native';
import Share from 'react-native-share';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import { notesnook } from '../../../e2e/test.ids';
-import { useTracked } from '../../provider';
-import { Actions } from '../../provider/Actions';
-import { DDS } from '../../services/DeviceDetection';
+import {notesnook} from '../../../e2e/test.ids';
+import {useTracked} from '../../provider';
+import {Actions} from '../../provider/Actions';
+import {DDS} from '../../services/DeviceDetection';
import {
eSendEvent,
openVault,
sendNoteEditedEvent,
- ToastEvent
+ ToastEvent,
} from '../../services/EventManager';
import PremiumService from '../../services/PremiumService';
import Sync from '../../services/Sync';
-import { editing, toTXT } from '../../utils';
+import {editing, toTXT} from '../../utils';
import {
ACCENT,
COLOR_SCHEME,
COLOR_SCHEME_DARK,
COLOR_SCHEME_LIGHT,
- setColorScheme
+ setColorScheme,
} from '../../utils/Colors';
-import { db } from '../../utils/DB';
+import {db} from '../../utils/DB';
import {
eOnNewTopicAdded,
-
eOpenMoveNoteDialog,
-
- refreshNotesPage
+ refreshNotesPage,
} from '../../utils/Events';
-import { deleteItems } from '../../utils/functions';
-import { MMKV } from '../../utils/mmkv';
-import { opacity, pv, SIZE } from '../../utils/SizeUtils';
-import { timeConverter } from '../../utils/TimeUtils';
-import { PremiumTag } from '../Premium/PremiumTag';
-import { PressableButton } from '../PressableButton';
-import { Toast } from '../Toast';
+import {deleteItems} from '../../utils/functions';
+import {MMKV} from '../../utils/mmkv';
+import {opacity, pv, SIZE} from '../../utils/SizeUtils';
+import {timeConverter} from '../../utils/TimeUtils';
+import {PremiumTag} from '../Premium/PremiumTag';
+import {PressableButton} from '../PressableButton';
+import {Toast} from '../Toast';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
-import { ActionSheetColorsSection } from './ActionSheetColorsSection';
-import { ActionSheetTagsSection } from './ActionSheetTagsSection';
+import {ActionSheetColorsSection} from './ActionSheetColorsSection';
+import {ActionSheetTagsSection} from './ActionSheetTagsSection';
const w = Dimensions.get('window').width;
export const ActionSheetComponent = ({
@@ -61,7 +63,6 @@ export const ActionSheetComponent = ({
const {colors, premiumUser, user} = state;
const [refreshing, setRefreshing] = useState(false);
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
-
const [note, setNote] = useState(
item
? item
@@ -191,12 +192,13 @@ export const ActionSheetComponent = ({
name: 'Delete',
icon: 'delete',
func: async () => {
- close();
+
try {
await deleteItems(note);
} catch (e) {
console.log(e);
}
+ //close();
},
},
{
@@ -486,7 +488,6 @@ export const ActionSheetComponent = ({
};
const onScrollEnd = () => {
-
getRef().current?.handleChildScrollEnd();
};
@@ -519,7 +520,7 @@ export const ActionSheetComponent = ({
}}
/>
{!note.id && !note.dateCreated ? (
- <Paragraph style={{marginVertical: 10}}>
+ <Paragraph style={{marginVertical: 10,alignSelf:"center"}}>
Start writing to save your note.
</Paragraph>
) : (
@@ -698,7 +699,7 @@ export const ActionSheetComponent = ({
note.notebooks?.length > 0 &&
note?.notebooks?.findIndex(
(o) => o.topics.indexOf(editing.actionAfterFirstSave.id) > -1,
- ) > -1 ? (
+ ) > -1 ? (
<PressableButton
type="accent"
accentColor="red"