diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js index 01c6c4d43..4bf7c0a17 100644 --- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js +++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useEffect} from 'react'; import {Platform} from 'react-native'; import {useTracked} from '../../provider'; import {DDS} from '../../services/DeviceDetection'; @@ -15,6 +15,7 @@ import { import {sleep} from '../../utils/TimeUtils'; import tiny from '../../views/Editor/tiny/tiny'; import {focusEditor} from '../../views/Editor/tiny/toolbar/constants'; +import {changeAppScale} from '../../utils/Animations'; const ActionSheetWrapper = ({ children, @@ -47,6 +48,28 @@ const ActionSheetWrapper = ({ }; }, [colors.bg, gestureEnabled]); + const _onOpen = () => { + //changeAppScale(0.975, 150); + onOpen && onOpen(); + }; + + const _onClose = async () => { + //changeAppScale(1, 150); + if (editing.isFocused === true) { + textInput.current?.focus(); + await sleep(10); + if (editing.focusType == 'editor') { + focusEditor(); + } else { + Platform.OS === 'android' && EditorWebView.current.requestFocus(); + tiny.call(EditorWebView, tiny.focusTitle); + } + } + if (onClose) { + onClose(); + } + }; + return ( } - onClose={async () => { - if (editing.isFocused === true) { - textInput.current?.focus(); - await sleep(10); - if (editing.focusType == 'editor') { - focusEditor(); - } else { - Platform.OS === 'android' && EditorWebView.current.requestFocus(); - tiny.call(EditorWebView, tiny.focusTitle); - } - } - if (onClose) { - onClose(); - } - }}> + onClose={_onClose}> {children} );