From 282b7c988bf7003f11fcfc33e8dbcff9ab04954d Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Tue, 1 Feb 2022 14:43:44 +0500 Subject: [PATCH] bump version --- .../android/app/src/main/AndroidManifest.xml | 3 +- .../ios/Notesnook.xcodeproj/project.pbxproj | 24 +- apps/mobile/share/index.js | 587 +++++++++--------- apps/mobile/share/search.js | 6 +- apps/mobile/version.js | 2 +- 5 files changed, 323 insertions(+), 299 deletions(-) diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml index f68898726..cca909325 100644 --- a/apps/mobile/android/app/src/main/AndroidManifest.xml +++ b/apps/mobile/android/app/src/main/AndroidManifest.xml @@ -68,11 +68,12 @@ diff --git a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj index aaa3d0be0..62e27970c 100644 --- a/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj +++ b/apps/mobile/ios/Notesnook.xcodeproj/project.pbxproj @@ -1118,7 +1118,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEVELOPMENT_TEAM = 53CWBG3QUC; ENABLE_BITCODE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1191,7 +1191,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1219,7 +1219,7 @@ CODE_SIGN_ENTITLEMENTS = Notesnook/Notesnook.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEVELOPMENT_TEAM = 53CWBG3QUC; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; HEADER_SEARCH_PATHS = ( @@ -1291,7 +1291,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -1449,7 +1449,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 53CWBG3QUC; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1460,7 +1460,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget; @@ -1490,7 +1490,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 53CWBG3QUC; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1501,7 +1501,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1530,7 +1530,7 @@ CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 53CWBG3QUC; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1603,7 +1603,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share; @@ -1633,7 +1633,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1713; + CURRENT_PROJECT_VERSION = 1714; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 53CWBG3QUC; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1706,7 +1706,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.7.12; + MARKETING_VERSION = 1.7.13; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/apps/mobile/share/index.js b/apps/mobile/share/index.js index aed5c9332..78e61b1f4 100644 --- a/apps/mobile/share/index.js +++ b/apps/mobile/share/index.js @@ -1,22 +1,25 @@ import Clipboard from '@react-native-clipboard/clipboard'; import { getLinkPreview } from 'link-preview-js'; import { HTMLRootElement } from 'node-html-parser/dist/nodes/html'; -import React, { useEffect, useRef, useState } from 'react'; +import React, { Fragment, useEffect, useRef, useState } from 'react'; import { ActivityIndicator, Alert, Keyboard, KeyboardAvoidingView, + Modal, + NativeModules, Platform, SafeAreaView, ScrollView, StatusBar, Text, TouchableOpacity, + UIManager, useWindowDimensions, View } from 'react-native'; -import Animated, { Easing, timing, useValue } from 'react-native-reanimated'; +import Animated, { acc, Easing, timing, useValue } from 'react-native-reanimated'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import WebView from 'react-native-webview'; @@ -213,6 +216,7 @@ const NotesnookShare = ({ quicknote = false }) => { const insets = Platform.OS === 'android' ? { top: StatusBar.currentHeight } : useSafeAreaInsets(); const prevAnimation = useRef(null); const [showSearch, setShowSearch] = useState(false); + const [kh, setKh] = useState(0); const animate = (opacityV, translateV) => { prevAnimation.current = translateV; @@ -232,10 +236,14 @@ const NotesnookShare = ({ quicknote = false }) => { const onKeyboardDidShow = event => { let kHeight = event.endCoordinates.height; keyboardHeight.current = kHeight; + setKh(kHeight); + console.log('keyboard show/hide'); }; const onKeyboardDidHide = () => { keyboardHeight.current = 0; + setKh(0); + console.log('keyboard hide'); }; useEffect(() => { @@ -466,33 +474,89 @@ const NotesnookShare = ({ quicknote = false }) => { } }; + const Outer = Platform.OS === 'android' ? Modal : Fragment; + + const outerProps = + Platform.OS === 'android' + ? { + animationType: 'fade', + transparent: true, + visible: true + } + : {}; + return ( - 500 ? 500 : width, - height: height, - opacity: Platform.OS !== 'ios' ? opacity : 1, - alignSelf: 'center' - }} - > - {quicknote && !showSearch ? ( - -