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
fix ui glitches
ammarahm-ed30082476362d
diff --git a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxprojindex 0621edffa..a80c048ec 100644--- a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj+++ b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj@@ -1079,7 +1079,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEVELOPMENT_TEAM = 53CWBG3QUC;ENABLE_BITCODE = NO;GCC_GENERATE_DEBUGGING_SYMBOLS = YES;@@ -1181,7 +1181,7 @@CODE_SIGN_ENTITLEMENTS = Notesnook/Notesnook.entitlements;CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_GENERATE_DEBUGGING_SYMBOLS = YES;HEADER_SEARCH_PATHS = (@@ -1411,7 +1411,7 @@CODE_SIGN_IDENTITY = "Apple Development";"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1452,7 +1452,7 @@CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1492,7 +1492,7 @@CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";CODE_SIGN_IDENTITY = "Apple Development";CODE_SIGN_STYLE = Automatic;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;@@ -1595,7 +1595,7 @@CODE_SIGN_IDENTITY = "iPhone Distribution";CODE_SIGN_STYLE = Manual;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 2001;+ CURRENT_PROJECT_VERSION = 2002;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = 53CWBG3QUC;GCC_C_LANGUAGE_STANDARD = gnu11;diff --git a/apps/mobile/ios/Podfile.lock b/apps/mobile/ios/Podfile.lockindex 694a3f259..6c5e25b0b 100644--- a/apps/mobile/ios/Podfile.lock+++ b/apps/mobile/ios/Podfile.lock@@ -647,7 +647,7 @@ SPEC CHECKSUMS:MMKV: 76033b9ace2006623308910a3afcc0e25eba3140MMKVCore: 3388952ded307e41b3ed8a05892736a236ed1b8epop: d582054913807fd11fd50bfe6a539d91c7e1a55a- RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8+ RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95aRCTRequired: ae07282b2ec9c90d7eb98251603bc3f82403d239RCTTypeSafety: a04dc1339af2e1da759ccd093bf11c310dce1ef6React: dbd201f781b180eab148aa961683943c72f67dcfdiff --git a/apps/mobile/src/components/intro/index.js b/apps/mobile/src/components/intro/index.jsindex 4de4e6441..3a4b4a51e 100644--- a/apps/mobile/src/components/intro/index.js+++ b/apps/mobile/src/components/intro/index.js@@ -23,7 +23,7 @@ export const SVG_Z = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 245.4const Intro = ({ navigation, route }) => {const colors = useThemeStore(state => state.colors);- const introCompleted = SettingsService.get().introCompleted;+ const introCompleted = useSettingStore(state => state.settings.introCompleted);const isTelemetryEnabled = useSettingStore(state => state.settings.telemetry);const { height } = useWindowDimensions();const insets = useSafeAreaInsets();diff --git a/apps/mobile/src/components/tabs/index.tsx b/apps/mobile/src/components/tabs/index.tsxindex af46a21c1..8f166ef0e 100644--- a/apps/mobile/src/components/tabs/index.tsx+++ b/apps/mobile/src/components/tabs/index.tsx@@ -7,7 +7,7 @@ import React, {useState} from 'react';import { BackHandler, ViewProps } from 'react-native';-import { Gesture, GestureDetector } from 'react-native-gesture-handler';+import { Gesture, GestureDetector, State } from 'react-native-gesture-handler';import Animated, {runOnJS,useAnimatedReaction,@@ -46,6 +46,7 @@ export const FluidTabs = forwardRef<TabsRef, TabProps>(ref) => {const deviceMode = useSettingStore(state => state.deviceMode);+ const fullscreen = useSettingStore(state => state.fullscreen);const introCompleted = useSettingStore(state => state.settings.introCompleted);const translateX = useSharedValue(widths ? widths.a : 0);const startX = useSharedValue(0);@@ -67,14 +68,20 @@ export const FluidTabs = forwardRef<TabsRef, TabProps>(const editorPosition = widths.a + widths.b;const isSmallTab = deviceMode === 'smallTablet';const isLoaded = useRef(false);+ const prevWidths = useRef(widths);useEffect(() => {- if (!isLoaded.current && introCompleted && deviceMode === 'tablet') {- translateX.value = 0;- isLoaded.current = true;- } else {+ console.log(deviceMode);+ if (introCompleted) {+ if (deviceMode === 'tablet' || fullscreen) {+ translateX.value = 0;+ } else {+ if (prevWidths.current?.a !== widths.a) translateX.value = widths.a;+ }isLoaded.current = true;+ prevWidths.current = widths;}+const sub = BackHandler.addEventListener('hardwareBackPress', () => {if (isDrawerOpen.value) {translateX.value = withTiming(homePosition);@@ -87,7 +94,7 @@ export const FluidTabs = forwardRef<TabsRef, TabProps>(return () => {sub && sub.remove();};- }, []);+ }, [introCompleted, deviceMode, widths]);useImperativeHandle(ref,diff --git a/apps/mobile/src/navigation/index.js b/apps/mobile/src/navigation/index.jsindex 61bea09e2..c714e3fbf 100644--- a/apps/mobile/src/navigation/index.js+++ b/apps/mobile/src/navigation/index.js@@ -1,4 +1,5 @@import React from 'react';+import { SafeAreaView } from 'react-native';import DelayLayout from '../components/delay-layout';import DialogProvider from '../components/dialog-provider';import { Header } from '../components/header';@@ -7,16 +8,16 @@ import { useNoteStore } from '../stores/use-notes-store';import { useSettingStore } from '../stores/use-setting-store';import { TabsHolder } from './tabs-holder';-//const DialogProvider = React.lazy(() => import('../components/dialogprovider'));-export const ApplicationHolder = React.memo(() => {const loading = useNoteStore(state => state.loading);const introCompleted = useSettingStore(state => state.settings.introCompleted);return loading && introCompleted ? (<>- <Header />- <DelayLayout animated={false} wait={loading} />+ <SafeAreaView>+ <Header />+ <DelayLayout animated={false} wait={loading} />+ </SafeAreaView></>) : (<>diff --git a/apps/mobile/src/navigation/tabsholder.js b/apps/mobile/src/navigation/tabsholder.jsindex 9aa5e4b77..b71713452 100644--- a/apps/mobile/src/navigation/tabsholder.js+++ b/apps/mobile/src/navigation/tabsholder.js@@ -125,6 +125,7 @@ export const TabsHolder = React.memo(if (!size || (size.width === dimensions.width && deviceMode !== null)) {DDS.setSize(size);setDeviceMode(deviceMode, size);+ checkDeviceType(size);return;}@@ -145,13 +146,19 @@ export const TabsHolder = React.memo(if (DDS.isLargeTablet()) {setDeviceMode('tablet', size);setTimeout(() => {- tabBarRef.current?.goToIndex(0);- }, 2500);+ introCompleted && tabBarRef.current?.goToIndex(0);+ }, 500);} else if (DDS.isSmallTab) {setDeviceMode('smallTablet', size);- setTimeout(() => {- tabBarRef.current?.closeDrawer();- }, 2500);+ if (!fullscreen) {+ setTimeout(() => {+ introCompleted && tabBarRef.current?.closeDrawer();+ }, 500);+ } else {+ setTimeout(() => {+ introCompleted && tabBarRef.current?.openDrawer();+ }, 500);+ }} else {setDeviceMode('mobile', size);}@@ -304,7 +311,7 @@ export const TabsHolder = React.memo(ref={tabBarRef}dimensions={dimensions}widths={!introCompleted ? widths['mobile'] : widths[deviceMode]}- enabled={deviceMode !== 'tablet'}+ enabled={deviceMode !== 'tablet' && !fullscreen}onScroll={onScroll}onChangeTab={onChangeTab}onDrawerStateChange={state => true}diff --git a/apps/mobile/src/screens/editor/index.tsx b/apps/mobile/src/screens/editor/index.tsxindex 54304ee8f..7f7952666 100755--- a/apps/mobile/src/screens/editor/index.tsx+++ b/apps/mobile/src/screens/editor/index.tsx@@ -139,7 +139,7 @@ const Editor = React.memo(allowUniversalAccessFromFileURLs={true}originWhitelist={['*']}source={{- uri: __DEV__ ? 'http://192.168.10.6:3000' : EDITOR_URI+ uri: __DEV__ ? EDITOR_URI : EDITOR_URI}}style={style}autoManageStatusBarEnabled={false}diff --git a/apps/mobile/src/screens/editor/wrapper.js b/apps/mobile/src/screens/editor/wrapper.jsindex 85008d6f5..eafe38338 100644--- a/apps/mobile/src/screens/editor/wrapper.js+++ b/apps/mobile/src/screens/editor/wrapper.js@@ -37,6 +37,13 @@ export const EditorWrapper = ({ width }) => {};}, [loading]);+ const getMarginBottom = () => {+ if (!keyboard.keyboardShown) return 0;+ if (Platform.isPad && !floating) return 16;+ if (Platform.OS == 'ios') return insets.bottom;+ return 6;+ };+return (<ViewtestID="editor-wrapper"@@ -54,14 +61,7 @@ export const EditorWrapper = ({ width }) => {behavior={Platform.OS === 'ios' ? 'padding' : 'height'}style={{flex: 1,- marginBottom:- Platform.OS === 'ios'- ? keyboard?.keyboardShown && !floating- ? Platform.isPad- ? 16- : insets.bottom- : insets.bottom- : 6+ marginBottom: getMarginBottom}}enabled={!floating}keyboardVerticalOffset={0}