mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 13:22:02 +03:00
Merge pull request #2127 from ecency/nt/post-options-scroll
Nt/post options scroll
This commit is contained in:
commit
c339ac6eb4
@ -3,7 +3,7 @@ import { useIntl } from 'react-intl';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { DateTimePicker, MainButton, Modal, SettingsItem } from '../../../components';
|
||||
import styles from './editorSettingsModalStyles';
|
||||
import styles from './postOptionsModalStyles';
|
||||
import ThumbSelectionContent from './thumbSelectionContent';
|
||||
import {View as AnimatedView} from 'react-native-animatable';
|
||||
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||
@ -27,12 +27,12 @@ const REWARD_TYPES = [
|
||||
|
||||
|
||||
|
||||
export interface EditorSettingsModalRef {
|
||||
export interface PostOptionsModalRef {
|
||||
showModal:()=>void;
|
||||
}
|
||||
|
||||
|
||||
interface EditorSettingsModalProps {
|
||||
interface PostOptionsModalProps {
|
||||
body:string;
|
||||
draftId:string;
|
||||
thumbIndex:number,
|
||||
@ -44,7 +44,7 @@ interface EditorSettingsModalProps {
|
||||
handleShouldReblogChange:(shouldReblog:boolean)=>void;
|
||||
}
|
||||
|
||||
const EditorSettingsModal = forwardRef(({
|
||||
const PostOptionsModal = forwardRef(({
|
||||
body,
|
||||
draftId,
|
||||
thumbIndex,
|
||||
@ -54,7 +54,7 @@ const EditorSettingsModal = forwardRef(({
|
||||
handleThumbSelection,
|
||||
handleScheduleChange,
|
||||
handleShouldReblogChange,
|
||||
}: EditorSettingsModalProps, ref) => {
|
||||
}: PostOptionsModalProps, ref) => {
|
||||
const intl = useIntl();
|
||||
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
@ -115,8 +115,8 @@ const EditorSettingsModal = forwardRef(({
|
||||
}
|
||||
|
||||
const _renderContent = (
|
||||
<View style={{flex:1}}>
|
||||
<KeyboardAwareScrollView contentContainerStyle={{flex:1}} >
|
||||
<View style={styles.fillSpace}>
|
||||
<KeyboardAwareScrollView style={styles.fillSpace} >
|
||||
<View style={styles.container}>
|
||||
{!isEdit && (
|
||||
<>
|
||||
@ -220,4 +220,4 @@ const EditorSettingsModal = forwardRef(({
|
||||
);
|
||||
});
|
||||
|
||||
export default EditorSettingsModal
|
||||
export default PostOptionsModal
|
@ -12,8 +12,10 @@ export default EStyleSheet.create({
|
||||
paddingTop: 32,
|
||||
paddingBottom: 16,
|
||||
},
|
||||
fillSpace:{
|
||||
flex:1
|
||||
},
|
||||
container: {
|
||||
flex: 1,
|
||||
paddingVertical: 8,
|
||||
paddingHorizontal: 32,
|
||||
},
|
@ -32,7 +32,7 @@ import { isCommunity } from '../../../utils/communityValidation';
|
||||
|
||||
import styles from './editorScreenStyles';
|
||||
import ThumbSelectionModal from '../children/thumbSelectionModal';
|
||||
import EditorSettingsModal from '../children/editorSettingsModal';
|
||||
import PostOptionsModal from '../children/postOptionsModal';
|
||||
|
||||
class EditorScreen extends Component {
|
||||
/* Props
|
||||
@ -40,7 +40,7 @@ class EditorScreen extends Component {
|
||||
* @prop { type } name - Description....
|
||||
*/
|
||||
thumbSelectionModalRef = null;
|
||||
editorSettingsModalRef = null;
|
||||
postOptionsModalRef = null;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -201,8 +201,8 @@ class EditorScreen extends Component {
|
||||
}
|
||||
|
||||
_handleSettingsPress = () => {
|
||||
if(this.editorSettingsModalRef){
|
||||
this.editorSettingsModalRef.show();
|
||||
if(this.postOptionsModalRef){
|
||||
this.postOptionsModalRef.show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,8 +458,8 @@ class EditorScreen extends Component {
|
||||
thumbIndex={thumbIndex}
|
||||
onThumbSelection={this._handleOnThumbSelection}
|
||||
/>
|
||||
<EditorSettingsModal
|
||||
ref={(componentRef) => (this.editorSettingsModalRef = componentRef)}
|
||||
<PostOptionsModal
|
||||
ref={(componentRef) => (this.postOptionsModalRef = componentRef)}
|
||||
body={fields.body}
|
||||
draftId={draftId}
|
||||
thumbIndex={thumbIndex}
|
||||
|
Loading…
Reference in New Issue
Block a user