mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
rename methods
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {Keyboard} from 'react-native';
|
||||
import {ScrollView} from 'react-native';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Clipboard,
|
||||
Dimensions,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
Dimensions, Keyboard, ScrollView, TouchableOpacity,
|
||||
View
|
||||
} from 'react-native';
|
||||
import Share from 'react-native-share';
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
@@ -18,7 +15,7 @@ import {
|
||||
eSendEvent,
|
||||
openVault,
|
||||
sendNoteEditedEvent,
|
||||
ToastEvent,
|
||||
ToastEvent
|
||||
} from '../../services/EventManager';
|
||||
import PremiumService from '../../services/PremiumService';
|
||||
import Sync from '../../services/Sync';
|
||||
@@ -28,19 +25,19 @@ import {
|
||||
COLOR_SCHEME,
|
||||
COLOR_SCHEME_DARK,
|
||||
COLOR_SCHEME_LIGHT,
|
||||
setColorScheme,
|
||||
setColorScheme
|
||||
} from '../../utils/Colors';
|
||||
import { db } from '../../utils/DB';
|
||||
import {
|
||||
eOnNewTopicAdded,
|
||||
eOpenLoginDialog,
|
||||
|
||||
eOpenMoveNoteDialog,
|
||||
eShowGetPremium,
|
||||
refreshNotesPage,
|
||||
|
||||
refreshNotesPage
|
||||
} from '../../utils/Events';
|
||||
import { deleteItems } from '../../utils/functions';
|
||||
import { MMKV } from '../../utils/mmkv';
|
||||
import {opacity, ph, pv, SIZE} from '../../utils/SizeUtils';
|
||||
import { opacity, pv, SIZE } from '../../utils/SizeUtils';
|
||||
import { timeConverter } from '../../utils/TimeUtils';
|
||||
import { PremiumTag } from '../Premium/PremiumTag';
|
||||
import { PressableButton } from '../PressableButton';
|
||||
@@ -489,7 +486,8 @@ export const ActionSheetComponent = ({
|
||||
};
|
||||
|
||||
const onScrollEnd = () => {
|
||||
getRef().current?.childScrollHandler();
|
||||
|
||||
getRef().current?.handleChildScrollEnd();
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -697,10 +695,10 @@ export const ActionSheetComponent = ({
|
||||
) : null}
|
||||
|
||||
{editing.actionAfterFirstSave.type === 'topic' &&
|
||||
note.notebooks &&
|
||||
note.notebooks.findIndex(
|
||||
(o) => o.id === editing.actionAfterFirstSave.id,
|
||||
) ? (
|
||||
note.notebooks?.length > 0 &&
|
||||
note?.notebooks?.findIndex(
|
||||
(o) => o.topics.indexOf(editing.actionAfterFirstSave.id) > -1,
|
||||
) > -1 ? (
|
||||
<PressableButton
|
||||
type="accent"
|
||||
accentColor="red"
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
eSendEvent,
|
||||
eSubscribeEvent,
|
||||
eUnSubscribeEvent,
|
||||
sendNoteEditedEvent,
|
||||
ToastEvent,
|
||||
} from '../../services/EventManager';
|
||||
import {db} from '../../utils/DB';
|
||||
@@ -125,8 +126,10 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
|
||||
if (note && note.id) {
|
||||
setNote({...db.notes.note(note.id).data});
|
||||
sendNoteEditedEvent(note.id);
|
||||
}
|
||||
dispatch({type: Actions.NOTEBOOKS});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -142,6 +145,8 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
);
|
||||
if (note && note.id) {
|
||||
setNote({...db.notes.note(note.id).data});
|
||||
|
||||
sendNoteEditedEvent(note.id);
|
||||
}
|
||||
dispatch({type: Actions.NOTEBOOKS});
|
||||
};
|
||||
@@ -174,13 +179,13 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
<FlatList
|
||||
nestedScrollEnabled={true}
|
||||
onScrollEndDrag={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onMomentumScrollEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onScrollAnimationEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
keyboardShouldPersistTaps="always"
|
||||
keyboardDismissMode="none"
|
||||
@@ -315,13 +320,13 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
keyboardShouldPersistTaps="always"
|
||||
keyboardDismissMode="none"
|
||||
onScrollEndDrag={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onMomentumScrollEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onScrollAnimationEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
style={{
|
||||
width: '90%',
|
||||
|
||||
@@ -100,12 +100,12 @@ class PremiumDialog extends React.Component {
|
||||
|
||||
<ScrollView
|
||||
nestedScrollEnabled={true}
|
||||
onScrollEndDrag={this.actionSheetRef.current?.childScrollHandler}
|
||||
onScrollEndDrag={this.actionSheetRef.current?.handleChildScrollEnd}
|
||||
onScrollAnimationEnd={
|
||||
this.actionSheetRef.current?.childScrollHandler
|
||||
this.actionSheetRef.current?.handleChildScrollEnd
|
||||
}
|
||||
onMomentumScrollEnd={
|
||||
this.actionSheetRef.current?.childScrollHandler
|
||||
this.actionSheetRef.current?.handleChildScrollEnd
|
||||
}
|
||||
style={{
|
||||
width: '100%',
|
||||
|
||||
@@ -198,13 +198,13 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
|
||||
<ScrollView
|
||||
nestedScrollEnabled
|
||||
onScrollEndDrag={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onMomentumScrollEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
onScrollAnimationEnd={() => {
|
||||
actionSheetRef.current?.childScrollHandler();
|
||||
actionSheetRef.current?.handleChildScrollEnd();
|
||||
}}
|
||||
style={{
|
||||
paddingHorizontal: 12,
|
||||
|
||||
Reference in New Issue
Block a user