mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
align to center
This commit is contained in:
@@ -2,8 +2,12 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Clipboard,
|
Clipboard,
|
||||||
Dimensions, Keyboard, ScrollView, TouchableOpacity,
|
Dimensions,
|
||||||
View
|
InteractionManager,
|
||||||
|
Keyboard,
|
||||||
|
ScrollView,
|
||||||
|
TouchableOpacity,
|
||||||
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Share from 'react-native-share';
|
import Share from 'react-native-share';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
@@ -15,7 +19,7 @@ import {
|
|||||||
eSendEvent,
|
eSendEvent,
|
||||||
openVault,
|
openVault,
|
||||||
sendNoteEditedEvent,
|
sendNoteEditedEvent,
|
||||||
ToastEvent
|
ToastEvent,
|
||||||
} from '../../services/EventManager';
|
} from '../../services/EventManager';
|
||||||
import PremiumService from '../../services/PremiumService';
|
import PremiumService from '../../services/PremiumService';
|
||||||
import Sync from '../../services/Sync';
|
import Sync from '../../services/Sync';
|
||||||
@@ -25,15 +29,13 @@ import {
|
|||||||
COLOR_SCHEME,
|
COLOR_SCHEME,
|
||||||
COLOR_SCHEME_DARK,
|
COLOR_SCHEME_DARK,
|
||||||
COLOR_SCHEME_LIGHT,
|
COLOR_SCHEME_LIGHT,
|
||||||
setColorScheme
|
setColorScheme,
|
||||||
} from '../../utils/Colors';
|
} from '../../utils/Colors';
|
||||||
import {db} from '../../utils/DB';
|
import {db} from '../../utils/DB';
|
||||||
import {
|
import {
|
||||||
eOnNewTopicAdded,
|
eOnNewTopicAdded,
|
||||||
|
|
||||||
eOpenMoveNoteDialog,
|
eOpenMoveNoteDialog,
|
||||||
|
refreshNotesPage,
|
||||||
refreshNotesPage
|
|
||||||
} from '../../utils/Events';
|
} from '../../utils/Events';
|
||||||
import {deleteItems} from '../../utils/functions';
|
import {deleteItems} from '../../utils/functions';
|
||||||
import {MMKV} from '../../utils/mmkv';
|
import {MMKV} from '../../utils/mmkv';
|
||||||
@@ -61,7 +63,6 @@ export const ActionSheetComponent = ({
|
|||||||
const {colors, premiumUser, user} = state;
|
const {colors, premiumUser, user} = state;
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
const [refreshing, setRefreshing] = useState(false);
|
||||||
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
|
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
|
||||||
|
|
||||||
const [note, setNote] = useState(
|
const [note, setNote] = useState(
|
||||||
item
|
item
|
||||||
? item
|
? item
|
||||||
@@ -191,12 +192,13 @@ export const ActionSheetComponent = ({
|
|||||||
name: 'Delete',
|
name: 'Delete',
|
||||||
icon: 'delete',
|
icon: 'delete',
|
||||||
func: async () => {
|
func: async () => {
|
||||||
close();
|
|
||||||
try {
|
try {
|
||||||
await deleteItems(note);
|
await deleteItems(note);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
//close();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -486,7 +488,6 @@ export const ActionSheetComponent = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onScrollEnd = () => {
|
const onScrollEnd = () => {
|
||||||
|
|
||||||
getRef().current?.handleChildScrollEnd();
|
getRef().current?.handleChildScrollEnd();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -519,7 +520,7 @@ export const ActionSheetComponent = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{!note.id && !note.dateCreated ? (
|
{!note.id && !note.dateCreated ? (
|
||||||
<Paragraph style={{marginVertical: 10}}>
|
<Paragraph style={{marginVertical: 10,alignSelf:"center"}}>
|
||||||
Start writing to save your note.
|
Start writing to save your note.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user