mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix some animations
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {SIZE, WEIGHT} from './src/common/common';
|
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import {useTracked} from './src/provider';
|
import {SIZE, WEIGHT} from './src/common/common';
|
||||||
import {w} from './src/utils/utils';
|
|
||||||
import {DialogManager} from './src/components/DialogManager';
|
import {DialogManager} from './src/components/DialogManager';
|
||||||
import {Toast} from './src/components/Toast';
|
import {Toast} from './src/components/Toast';
|
||||||
|
import {useTracked} from './src/provider';
|
||||||
|
import {w} from './src/utils/utils';
|
||||||
export const Loading = () => {
|
export const Loading = () => {
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
const {colors, loading} = state;
|
const {colors, loading} = state;
|
||||||
|
|||||||
@@ -3,25 +3,24 @@ import {
|
|||||||
Keyboard,
|
Keyboard,
|
||||||
KeyboardAvoidingView,
|
KeyboardAvoidingView,
|
||||||
Platform,
|
Platform,
|
||||||
|
SafeAreaView,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
StatusBar,
|
|
||||||
SafeAreaView,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
|
import {useSafeArea} from 'react-native-safe-area-context';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import {br, opacity, pv, SIZE, WEIGHT} from '../../common/common';
|
import {br, opacity, pv, SIZE, WEIGHT} from '../../common/common';
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {ACTIONS} from '../../provider/actions';
|
import {ACTIONS} from '../../provider/actions';
|
||||||
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/eventManager';
|
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/eventManager';
|
||||||
import {eScrollEvent, eClearSearch} from '../../services/events';
|
import {eClearSearch, eScrollEvent} from '../../services/events';
|
||||||
import {db, getElevation, ToastEvent, DDS, selection} from '../../utils/utils';
|
import {inputRef} from '../../utils/refs';
|
||||||
|
import {db, DDS, getElevation, selection, ToastEvent} from '../../utils/utils';
|
||||||
import {Header} from '../header';
|
import {Header} from '../header';
|
||||||
import {Search} from '../SearchInput';
|
import {Search} from '../SearchInput';
|
||||||
import SelectionHeader from '../SelectionHeader';
|
import SelectionHeader from '../SelectionHeader';
|
||||||
import {inputRef} from '../../utils/refs';
|
|
||||||
import {useSafeArea} from 'react-native-safe-area-context';
|
|
||||||
|
|
||||||
const AnimatedTouchableOpacity = Animatable.createAnimatableComponent(
|
const AnimatedTouchableOpacity = Animatable.createAnimatableComponent(
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
@@ -196,7 +195,9 @@ export const Container = ({
|
|||||||
}}>
|
}}>
|
||||||
{noSelectionHeader ? null : <SelectionHeader items={data} />}
|
{noSelectionHeader ? null : <SelectionHeader items={data} />}
|
||||||
|
|
||||||
<View
|
<Animatable.View
|
||||||
|
transition="backgroundColor"
|
||||||
|
duration={300}
|
||||||
style={{
|
style={{
|
||||||
position: selectionMode ? 'relative' : 'absolute',
|
position: selectionMode ? 'relative' : 'absolute',
|
||||||
backgroundColor: colors.bg,
|
backgroundColor: colors.bg,
|
||||||
@@ -237,7 +238,7 @@ export const Container = ({
|
|||||||
value={text}
|
value={text}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</Animatable.View>
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ import {ph, pv, SIZE, WEIGHT} from '../../common/common';
|
|||||||
import {eSendEvent, openVault} from '../../services/eventManager';
|
import {eSendEvent, openVault} from '../../services/eventManager';
|
||||||
import {eOnLoadNote, eShowMergeDialog} from '../../services/events';
|
import {eOnLoadNote, eShowMergeDialog} from '../../services/events';
|
||||||
import {openEditorAnimation} from '../../utils/animations';
|
import {openEditorAnimation} from '../../utils/animations';
|
||||||
import {DDS, timeSince, db} from '../../utils/utils';
|
import {DDS, timeSince} from '../../utils/utils';
|
||||||
import {ActionSheetEvent, simpleDialogEvent} from '../DialogManager/recievers';
|
import {ActionSheetEvent, simpleDialogEvent} from '../DialogManager/recievers';
|
||||||
import {TEMPLATE_TRASH} from '../DialogManager/templates';
|
import {TEMPLATE_TRASH} from '../DialogManager/templates';
|
||||||
import storage from '../../utils/storage';
|
|
||||||
|
|
||||||
const w = Dimensions.get('window').width;
|
const w = Dimensions.get('window').width;
|
||||||
const h = Dimensions.get('window').height;
|
const h = Dimensions.get('window').height;
|
||||||
|
|||||||
@@ -71,3 +71,5 @@ export const eClearEditor = '534';
|
|||||||
export const eApplyChanges = '535';
|
export const eApplyChanges = '535';
|
||||||
|
|
||||||
export const eShowMergeDialog = '536';
|
export const eShowMergeDialog = '536';
|
||||||
|
|
||||||
|
export const eSwitchNightMode = '537';
|
||||||
|
|||||||
Reference in New Issue
Block a user