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
refactor and disable animations
ammarahm-edddc0ffdf4594
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.jsindex 08a5e7eee..cafb09194 100644--- a/apps/mobile/src/components/Container/index.js+++ b/apps/mobile/src/components/Container/index.js@@ -13,7 +13,7 @@ export const Container = ({children, root}) => {return (<KeyboardAvoidingView behavior="padding" enabled={Platform.OS === 'ios'}style={{- backgroundColor:colors.nav,+ backgroundColor:colors.bg,width:"100%",height:"100%"}}diff --git a/apps/mobile/src/navigation/Drawer.js b/apps/mobile/src/navigation/Drawer.jsindex 690860b54..20f6c0ee0 100644--- a/apps/mobile/src/navigation/Drawer.js+++ b/apps/mobile/src/navigation/Drawer.js@@ -30,11 +30,11 @@ const onStateChange = (state) => {const onNavigatorStateChange = (e) => {if (e.history.find((i) => i.type === 'drawer')) {- changeContainerScale(ContainerScale, 0.95, 250);- changeContainerScale(DrawerScale, 1, 250);+ //changeContainerScale(ContainerScale, 0.95, 250);+ //changeContainerScale(DrawerScale, 1, 250);} else {- changeContainerScale(DrawerScale, 0.95, 250);- changeContainerScale(ContainerScale, 1, 250);+ //changeContainerScale(DrawerScale, 0.95, 250);+ //changeContainerScale(ContainerScale, 1, 250);}}diff --git a/apps/mobile/src/utils/Animations.js b/apps/mobile/src/utils/Animations.jsindex 874b7f723..a0d74fa28 100644--- a/apps/mobile/src/utils/Animations.js+++ b/apps/mobile/src/utils/Animations.js@@ -68,7 +68,7 @@ export const AppScale = new Animated.Value(0.95);export const AppBorders = new Animated.Value(10);export const ContainerScale = new Animated.Value(0.95);export const EditorScalee = new Animated.Value(1);-export const DrawerScale = new Animated.Value(0.95);+export const DrawerScale = new Animated.Value(1);export function changeContainerScale(op, scale, duration = 500, callback) {timing(op, {diff --git a/apps/mobile/src/views/Editor/EditorOverlay.js b/apps/mobile/src/views/Editor/EditorOverlay.jsindex fd2224871..30b517e2e 100644--- a/apps/mobile/src/views/Editor/EditorOverlay.js+++ b/apps/mobile/src/views/Editor/EditorOverlay.js@@ -29,15 +29,13 @@ const EditorOverlay = () => {clearTimeout(timerError);setProgress(2);if (_loading) {- timer = setTimeout(() => {- setLoading(_loading);- timerError = setTimeout(() => {- setError(true);- }, 3000);- },1000)+ setLoading(_loading);+ timerError = setTimeout(() => {+ setError(true);+ }, 4000);} else {setProgress(4);- await sleep(10);+ await sleep(1);setError(false);timing(opacity, {toValue: 0,@@ -45,11 +43,11 @@ const EditorOverlay = () => {easing: Easing.out(Easing.ease),}).start(async () => {await sleep(150);+ setLoading(false);setProgress(1);opacity.setValue(1);clearTimeout(timer);clearTimeout(timerError);- setLoading(false);});}};@@ -71,7 +69,7 @@ const EditorOverlay = () => {justifyContent: 'center',alignItems: 'center',opacity: opacity,- top: loading ? 0 : 6000,+ top: 0,zIndex: 100,}}><View@@ -89,11 +87,17 @@ const EditorOverlay = () => {height: 10,width: 100,marginBottom: 15,+ borderRadius: 5,+ overflow: 'hidden',+ backgroundColor:colors.nav}}>- <AnimatedProgress- fill={error ? 'red' : colors.accent}- total={4}- current={progress}+ <Animated.View+ style={{+ height: 10,+ borderRadius: 5,+ width:100,+ backgroundColor:colors.accent+ }}/></View>@@ -101,16 +105,18 @@ const EditorOverlay = () => {textBreakStrategy="balanced"style={{textAlign: 'center', marginBottom: 5}}size={SIZE.lg}>- {loading?.title ? loading.title : 'Loading Note'}+ {loading?.title ? loading.title : 'Loading editor'}</Heading>- <Paragraph- textBreakStrategy="balanced"- style={{textAlign: 'center'}}- color={colors.icon}- size={SIZE.sm}>- {loading && timeConverter(loading.dateEdited)}- </Paragraph>+ {loading?.dateEdited ? (+ <Paragraph+ textBreakStrategy="balanced"+ style={{textAlign: 'center'}}+ color={colors.icon}+ size={SIZE.sm}>+ {timeConverter(loading.dateEdited)}+ </Paragraph>+ ) : null}</View>{error && (diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/views/Editor/tiny/tiny.jsindex 37c2d3013..75cfd3e7a 100644--- a/apps/mobile/src/views/Editor/tiny/tiny.js+++ b/apps/mobile/src/views/Editor/tiny/tiny.js@@ -1,4 +1,4 @@-import {EditorWebView, getWebviewInit} from '../Functions';+import { getWebviewInit } from '../Functions';const reset = `isLoading = true;