A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
remove unecessary animations
ammarahm-edee9605cb3ef9
diff --git a/apps/mobile/src/components/AppLoader/index.js b/apps/mobile/src/components/AppLoader/index.jsindex 4074e5b1a..93e1fb079 100644--- a/apps/mobile/src/components/AppLoader/index.js+++ b/apps/mobile/src/components/AppLoader/index.js@@ -18,18 +18,15 @@ import {MMKV} from '../../utils/mmkv';import {tabBarRef} from '../../utils/Refs';import SplashScreen from '../SplashScreen';-const scaleV = new Animated.Value(0.95);const opacityV = new Animated.Value(1);const AppLoader = ({onLoad}) => {const [state, dispatch] = useTracked();const colors = state.colors;const [loading, setLoading] = useState(true);- const [opacity, setOpacity] = useState(true);const setNotes = useNoteStore(state => state.setNotes);const setFavorites = useFavoriteStore(state => state.setFavorites);const _setLoading = useNoteStore(state => state.setLoading);const load = async value => {- console.log('loading called here');if (value === 'hide') {setLoading(true);opacityV.setValue(1);@@ -59,31 +56,24 @@ const AppLoader = ({onLoad}) => {return;}eSendEvent(eOpenSideMenu);- setOpacity(false);- setTimeout(() => {- Animated.timing(opacityV, {- toValue: 0,- duration: 100,- easing: Easing.out(Easing.ease),- }).start();- changeContainerScale(ContainerScale, 1, 600);-- setTimeout(async () => {- setLoading(false);- await db.notes.init();- setNotes();- setFavorites();- _setLoading(false);- eSendEvent(eOpenSideMenu);- let askForRating = await MMKV.getItem('askForRating');- if (askForRating !== 'never' || askForRating !== 'completed') {- askForRating = JSON.parse(askForRating);- if (askForRating?.timestamp < Date.now()) {- eSendEvent(eOpenRateDialog);- }- }- }, 0);- }, 0);+ Animated.timing(opacityV, {+ toValue: 0,+ duration: 100,+ easing: Easing.out(Easing.ease),+ }).start();+ setLoading(false);+ await db.notes.init();+ setNotes();+ setFavorites();+ _setLoading(false);+ eSendEvent(eOpenSideMenu);+ let askForRating = await MMKV.getItem('askForRating');+ if (askForRating !== 'never' || askForRating !== 'completed') {+ askForRating = JSON.parse(askForRating);+ if (askForRating?.timestamp < Date.now()) {+ eSendEvent(eOpenRateDialog);+ }+ }};useEffect(() => {@@ -97,7 +87,7 @@ const AppLoader = ({onLoad}) => {return loading ? (<Animated.Viewstyle={{- backgroundColor: opacity ? colors.bg : 'rgba(0,0,0,0)',+ backgroundColor: colors.bg,width: '100%',height: '100%',position: 'absolute',diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.jsindex e64a184fa..d2dc7b644 100644--- a/apps/mobile/src/components/Container/index.js+++ b/apps/mobile/src/components/Container/index.js@@ -1,10 +1,7 @@import React from 'react';-import { KeyboardAvoidingView, Platform, SafeAreaView } from 'react-native';-import Animated from 'react-native-reanimated';+import { KeyboardAvoidingView, Platform, View } from 'react-native';import { useTracked } from '../../provider';-import { ContainerScale } from '../../utils/Animations';import useIsFloatingKeyboard from '../../utils/use-is-floating-keyboard';-const AnimatedView = Animated.createAnimatedComponent(SafeAreaView);export const Container = ({children, root}) => {const [state] = useTracked();const {colors, } = state;@@ -17,21 +14,15 @@ export const Container = ({children, root}) => {height:"100%"}}>- <AnimatedView+ <Viewstyle={{height: '100%',backgroundColor:colors.bg,- borderRadius:10,overflow:"hidden",- transform:[- {- scale:ContainerScale- }- ]}}>{children}- </AnimatedView>+ </View></KeyboardAvoidingView>);};