mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-04 20:15:51 +03:00
Merge pull request #1236 from esteemapp/revert-1233-bugfix/markdown-darktheme
Revert "created themeContainer fixed markdown placeholder issue"
This commit is contained in:
commit
63fd07fa18
@ -1,38 +1,34 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import Placeholder from 'rn-placeholder';
|
import Placeholder from 'rn-placeholder';
|
||||||
|
|
||||||
import { ThemeContainer } from '../../../../containers';
|
|
||||||
|
|
||||||
import styles from './listItemPlaceHolderStyles';
|
import styles from './listItemPlaceHolderStyles';
|
||||||
|
|
||||||
const ListItemPlaceHolderView = () => {
|
const ListItemPlaceHolderView = ({ isDarkTheme }) => {
|
||||||
|
const color = isDarkTheme ? '#2e3d51' : '#f5f5f5';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContainer>
|
<View style={styles.container}>
|
||||||
{({ isDarkTheme }) => (
|
<Placeholder.Media size={30} hasRadius animate="fade" color={color} />
|
||||||
<View style={styles.container}>
|
<View style={styles.paragraphWrapper}>
|
||||||
<Placeholder.Media
|
<Placeholder.Paragraph
|
||||||
size={30}
|
color={color}
|
||||||
hasRadius
|
lineNumber={2}
|
||||||
animate="fade"
|
textSize={12}
|
||||||
color={isDarkTheme ? '#2e3d51' : '#f5f5f5'}
|
lineSpacing={8}
|
||||||
/>
|
width="100%"
|
||||||
<View style={styles.paragraphWrapper}>
|
lastLineWidth="70%"
|
||||||
<Placeholder.Paragraph
|
firstLineWidth="50%"
|
||||||
color={isDarkTheme ? '#2e3d51' : '#f5f5f5'}
|
animate="fade"
|
||||||
lineNumber={2}
|
/>
|
||||||
textSize={12}
|
</View>
|
||||||
lineSpacing={8}
|
</View>
|
||||||
width="100%"
|
|
||||||
lastLineWidth="70%"
|
|
||||||
firstLineWidth="50%"
|
|
||||||
animate="fade"
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</ThemeContainer>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ListItemPlaceHolderView;
|
const mapStateToProps = state => ({
|
||||||
|
isDarkTheme: state.application.isDarkTheme,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(ListItemPlaceHolderView);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* eslint-disable radix */
|
/* eslint-disable radix */
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
import { Dimensions } from 'react-native';
|
import { Dimensions } from 'react-native';
|
||||||
import times from 'lodash/times';
|
import times from 'lodash/times';
|
||||||
|
|
||||||
@ -17,4 +18,9 @@ const ListPlaceHolderView = () => {
|
|||||||
|
|
||||||
return <Fragment>{listElements}</Fragment>;
|
return <Fragment>{listElements}</Fragment>;
|
||||||
};
|
};
|
||||||
export default ListPlaceHolderView;
|
|
||||||
|
const mapStateToProps = state => ({
|
||||||
|
isDarkTheme: state.application.isDarkTheme,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(ListPlaceHolderView);
|
||||||
|
@ -13,8 +13,6 @@ import { PostBody } from '../../postElements';
|
|||||||
import { StickyBar } from '../../basicUIElements';
|
import { StickyBar } from '../../basicUIElements';
|
||||||
import { TextInput } from '../../textInput';
|
import { TextInput } from '../../textInput';
|
||||||
|
|
||||||
import { ThemeContainer } from '../../../containers';
|
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
import styles from './markdownEditorStyles';
|
import styles from './markdownEditorStyles';
|
||||||
|
|
||||||
@ -203,26 +201,22 @@ export default class MarkdownEditorView extends Component {
|
|||||||
behavior={Platform.OS === 'ios' ? 'padding' : null}
|
behavior={Platform.OS === 'ios' ? 'padding' : null}
|
||||||
>
|
>
|
||||||
{!isPreviewActive ? (
|
{!isPreviewActive ? (
|
||||||
<ThemeContainer>
|
<TextInput
|
||||||
{({ isDarkTheme }) => (
|
multiline
|
||||||
<TextInput
|
onChangeText={this._changeText}
|
||||||
multiline
|
onSelectionChange={this._handleOnSelectionChange}
|
||||||
onChangeText={this._changeText}
|
placeholder={intl.formatMessage({
|
||||||
onSelectionChange={this._handleOnSelectionChange}
|
id: isReply ? 'editor.reply_placeholder' : 'editor.default_placeholder',
|
||||||
placeholder={intl.formatMessage({
|
})}
|
||||||
id: isReply ? 'editor.reply_placeholder' : 'editor.default_placeholder',
|
placeholderTextColor="#c1c5c7"
|
||||||
})}
|
selection={selection}
|
||||||
placeholderTextColor={isDarkTheme ? '#526d91' : '#c1c5c7'}
|
selectionColor="#357ce6"
|
||||||
selection={selection}
|
style={styles.textWrapper}
|
||||||
selectionColor="#357ce6"
|
underlineColorAndroid="transparent"
|
||||||
style={styles.textWrapper}
|
value={text}
|
||||||
underlineColorAndroid="transparent"
|
innerRef={this.inputRef}
|
||||||
value={text}
|
editable={!isLoading}
|
||||||
innerRef={this.inputRef}
|
/>
|
||||||
editable={!isLoading}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</ThemeContainer>
|
|
||||||
) : (
|
) : (
|
||||||
this._renderPreview()
|
this._renderPreview()
|
||||||
)}
|
)}
|
||||||
|
@ -6,7 +6,6 @@ import ProfileEditContainer from './profileEditContainer';
|
|||||||
import RedeemContainer from './redeemContainer';
|
import RedeemContainer from './redeemContainer';
|
||||||
import SpinGameContainer from './spinGameContainer';
|
import SpinGameContainer from './spinGameContainer';
|
||||||
import TransferContainer from './transferContainer';
|
import TransferContainer from './transferContainer';
|
||||||
import ThemeContainer from './themeContainer';
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
DarkThemeContainer,
|
DarkThemeContainer,
|
||||||
@ -17,5 +16,4 @@ export {
|
|||||||
RedeemContainer,
|
RedeemContainer,
|
||||||
SpinGameContainer,
|
SpinGameContainer,
|
||||||
TransferContainer,
|
TransferContainer,
|
||||||
ThemeContainer,
|
|
||||||
};
|
};
|
||||||
|
@ -140,6 +140,7 @@ class RedeemContainer extends Component {
|
|||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
username: state.account.currentAccount.name,
|
username: state.account.currentAccount.name,
|
||||||
|
isDarkTheme: state.application.isDarkTheme,
|
||||||
activeBottomTab: state.ui.activeBottomTab,
|
activeBottomTab: state.ui.activeBottomTab,
|
||||||
isConnected: state.application.isConnected,
|
isConnected: state.application.isConnected,
|
||||||
accounts: state.account.otherAccounts,
|
accounts: state.account.otherAccounts,
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
/* eslint-disable no-unused-vars */
|
|
||||||
import React from 'react';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
|
|
||||||
const ThemeContainer = ({ children, isDarkTheme }) => {
|
|
||||||
return (
|
|
||||||
children &&
|
|
||||||
children({
|
|
||||||
isDarkTheme,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
|
||||||
isDarkTheme: state.application.isDarkTheme,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default connect(mapStateToProps)(ThemeContainer);
|
|
@ -151,12 +151,13 @@ class NotificationContainer extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isLoggedIn } = this.props;
|
const { isLoggedIn } = this.props;
|
||||||
const { notifications, isNotificationRefreshing } = this.state;
|
const { notifications, isNotificationRefreshing, isDarkTheme } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NotificationScreen
|
<NotificationScreen
|
||||||
getActivities={this._getAvtivities}
|
getActivities={this._getAvtivities}
|
||||||
notifications={notifications}
|
notifications={notifications}
|
||||||
|
isDarkTheme={isDarkTheme}
|
||||||
navigateToNotificationRoute={this._navigateToNotificationRoute}
|
navigateToNotificationRoute={this._navigateToNotificationRoute}
|
||||||
readAllNotification={this._readAllNotification}
|
readAllNotification={this._readAllNotification}
|
||||||
handleLoginPress={this._handleOnPressLogin}
|
handleLoginPress={this._handleOnPressLogin}
|
||||||
@ -170,6 +171,7 @@ class NotificationContainer extends Component {
|
|||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
isLoggedIn: state.application.isLoggedIn,
|
isLoggedIn: state.application.isLoggedIn,
|
||||||
|
isDarkTheme: state.application.isDarkTheme,
|
||||||
isConnected: state.application.isConnected,
|
isConnected: state.application.isConnected,
|
||||||
|
|
||||||
username: state.account.currentAccount.name,
|
username: state.account.currentAccount.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user