fixed couple bugs && minimized all image & removed unused image
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 585 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/default_cover_image.png
Normal file → Executable file
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 72 KiB |
BIN
src/assets/esteem@2x.png
Normal file → Executable file
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 14 KiB |
BIN
src/assets/esteem_transparent@2x.png
Normal file → Executable file
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 23 KiB |
BIN
src/assets/love_mascot.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 286 KiB |
Before Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 972 B |
BIN
src/assets/no_image.png
Normal file → Executable file
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
src/assets/no_post.png
Normal file → Executable file
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/steem_connect.png
Normal file → Executable file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
@ -1,5 +1,6 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { withNavigation } from 'react-navigation';
|
import { withNavigation } from 'react-navigation';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { getComments } from '../../../providers/steem/dsteem';
|
import { getComments } from '../../../providers/steem/dsteem';
|
||||||
|
|
||||||
@ -59,15 +60,20 @@ class CommentsContainer extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { comments } = this.state;
|
const { comments } = this.state;
|
||||||
|
const { isLoggedIn } = this.props;
|
||||||
return (
|
return (
|
||||||
<CommentsView
|
<CommentsView
|
||||||
handleOnReplyPress={this._handleOnReplyPress}
|
handleOnReplyPress={this._handleOnReplyPress}
|
||||||
comments={comments}
|
comments={comments}
|
||||||
|
isLoggedIn={isLoggedIn}
|
||||||
{...this.props}
|
{...this.props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withNavigation(CommentsContainer);
|
const mapStateToProps = state => ({
|
||||||
|
isLoggedIn: state.application.isLoggedIn,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default withNavigation(connect(mapStateToProps)(CommentsContainer));
|
||||||
|
@ -39,6 +39,7 @@ class CommentsView extends Component {
|
|||||||
commentNumber,
|
commentNumber,
|
||||||
handleOnReplyPress,
|
handleOnReplyPress,
|
||||||
isProfilePreview,
|
isProfilePreview,
|
||||||
|
isLoggedIn,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
// commentNumber === 8 && alert('sekkiz:');
|
// commentNumber === 8 && alert('sekkiz:');
|
||||||
return (
|
return (
|
||||||
@ -73,6 +74,7 @@ class CommentsView extends Component {
|
|||||||
name="reply"
|
name="reply"
|
||||||
onPress={() => handleOnReplyPress && handleOnReplyPress(item)}
|
onPress={() => handleOnReplyPress && handleOnReplyPress(item)}
|
||||||
iconType="FontAwesome"
|
iconType="FontAwesome"
|
||||||
|
disabled={!isLoggedIn}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -5,9 +5,9 @@ import { Icon } from '../../icon';
|
|||||||
import styles from './iconButtonStyles';
|
import styles from './iconButtonStyles';
|
||||||
|
|
||||||
/* Props
|
/* Props
|
||||||
* ------------------------------------------------
|
* ------------------------------------------------
|
||||||
* @prop { type } name - Description....
|
* @prop { type } name - Description....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const IconButton = ({
|
const IconButton = ({
|
||||||
name,
|
name,
|
||||||
@ -18,12 +18,14 @@ const IconButton = ({
|
|||||||
style,
|
style,
|
||||||
iconStyle,
|
iconStyle,
|
||||||
iconType,
|
iconType,
|
||||||
|
disabled,
|
||||||
}) => (
|
}) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
style={[styles.iconButton, style]}
|
style={[styles.iconButton, style]}
|
||||||
onPress={() => onPress && onPress()}
|
onPress={() => onPress && onPress()}
|
||||||
underlayColor={backgroundColor || 'white'}
|
underlayColor={backgroundColor || 'white'}
|
||||||
|
disabled={disabled}
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
style={[
|
style={[
|
||||||
|
@ -57,6 +57,7 @@ class PostDisplayView extends Component {
|
|||||||
handleOnEditPress,
|
handleOnEditPress,
|
||||||
handleOnReplyPress,
|
handleOnReplyPress,
|
||||||
handleOnVotersPress,
|
handleOnVotersPress,
|
||||||
|
isLoggedIn,
|
||||||
post,
|
post,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
@ -97,6 +98,7 @@ class PostDisplayView extends Component {
|
|||||||
name="reply"
|
name="reply"
|
||||||
onPress={() => handleOnReplyPress && handleOnReplyPress()}
|
onPress={() => handleOnReplyPress && handleOnReplyPress()}
|
||||||
iconType="FontAwesome"
|
iconType="FontAwesome"
|
||||||
|
disabled={!isLoggedIn}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -35,6 +35,17 @@ class PostsView extends Component {
|
|||||||
this._loadPosts();
|
this._loadPosts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { currentAccountUsername } = this.props;
|
||||||
|
|
||||||
|
if (
|
||||||
|
currentAccountUsername !== nextProps.currentAccountUsername
|
||||||
|
&& nextProps.currentAccountUsername
|
||||||
|
) {
|
||||||
|
this._loadPosts();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_loadPosts = (filter = null) => {
|
_loadPosts = (filter = null) => {
|
||||||
const { getFor, tag, currentAccountUsername } = this.props;
|
const { getFor, tag, currentAccountUsername } = this.props;
|
||||||
let options;
|
let options;
|
||||||
|
@ -29,27 +29,37 @@ class SideMenuContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Component Life Cycle Functions
|
// Component Life Cycle Functions
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const accounts = [];
|
const { otherAccounts } = this.props;
|
||||||
|
|
||||||
getUserData().then((userData) => {
|
this._createUserList(otherAccounts);
|
||||||
userData.forEach((element) => {
|
|
||||||
accounts.push({
|
|
||||||
name: `@${element.username}`,
|
|
||||||
username: element.username,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
accounts.push({
|
|
||||||
name: 'Add Account',
|
|
||||||
route: ROUTES.SCREENS.LOGIN,
|
|
||||||
icon: 'add',
|
|
||||||
id: 'add_account',
|
|
||||||
});
|
|
||||||
this.setState({ accounts });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { otherAccounts, isLoggedIn } = this.props;
|
||||||
|
|
||||||
|
if (isLoggedIn && otherAccounts !== nextProps.otherAccounts) {
|
||||||
|
this._createUserList(nextProps.otherAccounts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_createUserList = (otherAccounts) => {
|
||||||
|
const accounts = [];
|
||||||
|
otherAccounts.forEach((element) => {
|
||||||
|
accounts.push({
|
||||||
|
name: `@${element.username}`,
|
||||||
|
username: element.username,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
accounts.push({
|
||||||
|
name: 'Add Account',
|
||||||
|
route: ROUTES.SCREENS.LOGIN,
|
||||||
|
icon: 'add',
|
||||||
|
id: 'add_account',
|
||||||
|
});
|
||||||
|
this.setState({ accounts });
|
||||||
|
};
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
_navigateToRoute = (route = null) => {
|
_navigateToRoute = (route = null) => {
|
||||||
@ -61,11 +71,10 @@ class SideMenuContainer extends Component {
|
|||||||
|
|
||||||
_switchAccount = (anchor = null) => {
|
_switchAccount = (anchor = null) => {
|
||||||
const { dispatch, currentAccount, navigation } = this.props;
|
const { dispatch, currentAccount, navigation } = this.props;
|
||||||
const username = anchor.slice(1);
|
|
||||||
|
|
||||||
if (username !== currentAccount.name) {
|
if (anchor !== currentAccount.name) {
|
||||||
switchAccount(username).then((accountData) => {
|
switchAccount(anchor).then((accountData) => {
|
||||||
const realmData = getUserDataWithUsername(username);
|
const realmData = getUserDataWithUsername(anchor);
|
||||||
const _currentAccount = accountData;
|
const _currentAccount = accountData;
|
||||||
|
|
||||||
_currentAccount.username = _currentAccount.name;
|
_currentAccount.username = _currentAccount.name;
|
||||||
@ -103,7 +112,8 @@ class SideMenuContainer extends Component {
|
|||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
isLoggedIn: state.application.isLoggedIn,
|
isLoggedIn: state.application.isLoggedIn,
|
||||||
currentAccount: state.account.currentAccount || {},
|
currentAccount: state.account.currentAccount,
|
||||||
|
otherAccounts: state.account.otherAccounts,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(SideMenuContainer);
|
export default connect(mapStateToProps)(SideMenuContainer);
|
||||||
|
@ -75,7 +75,7 @@ class SideMenuView extends Component {
|
|||||||
if (item.route) {
|
if (item.route) {
|
||||||
navigateToRoute(item.route);
|
navigateToRoute(item.route);
|
||||||
} else {
|
} else {
|
||||||
switchAccount(item.name);
|
switchAccount(item.username);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const DEFAULT_IMAGE = require('../../../assets/avatar_default.png');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const UserAvatarView = ({ username, size, style }) => {
|
const UserAvatarView = ({ username, size, style }) => {
|
||||||
const imageSize = size === 'xl' ? 'large' : 'medium';
|
const imageSize = size === 'xl' ? 'large' : 'small';
|
||||||
const _avatar = username
|
const _avatar = username
|
||||||
? { uri: `https://steemitimages.com/u/${username}/avatar/${imageSize}` }
|
? { uri: `https://steemitimages.com/u/${username}/avatar/${imageSize}` }
|
||||||
: DEFAULT_IMAGE;
|
: DEFAULT_IMAGE;
|
||||||
|
@ -19,7 +19,6 @@ const initialState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function (state = initialState, action) {
|
export default function (state = initialState, action) {
|
||||||
console.log(action);
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case FETCHING_ACCOUNT:
|
case FETCHING_ACCOUNT:
|
||||||
return {
|
return {
|
||||||
|
@ -98,19 +98,17 @@ class ApplicationContainer extends Component {
|
|||||||
authStatus = res;
|
authStatus = res;
|
||||||
currentUsername = res.currentUsername;
|
currentUsername = res.currentUsername;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (authStatus.isLoggedIn) {
|
getUserData().then((userData) => {
|
||||||
getUserData().then((userData) => {
|
if (userData.length > 0) {
|
||||||
if (userData.length > 0) {
|
realmData = userData;
|
||||||
realmData = userData;
|
|
||||||
|
|
||||||
userData.forEach((accountData) => {
|
userData.forEach((accountData) => {
|
||||||
dispatch(
|
dispatch(
|
||||||
addOtherAccount({ username: accountData.username }),
|
addOtherAccount({ username: accountData.username }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (realmData) {
|
if (realmData) {
|
||||||
|
@ -47,10 +47,17 @@ class PostContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { currentAccount } = this.props;
|
const { currentAccount, isLoggedIn } = this.props;
|
||||||
const { post, error } = this.state;
|
const { post, error } = this.state;
|
||||||
|
|
||||||
return <PostScreen currentAccount={currentAccount} post={post} error={error} />;
|
return (
|
||||||
|
<PostScreen
|
||||||
|
currentAccount={currentAccount}
|
||||||
|
error={error}
|
||||||
|
isLoggedIn={isLoggedIn}
|
||||||
|
post={post}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class PostScreen extends Component {
|
|||||||
// Component Functions
|
// Component Functions
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { post, currentAccount } = this.props;
|
const { post, currentAccount, isLoggedIn } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@ -33,7 +33,7 @@ class PostScreen extends Component {
|
|||||||
content={post}
|
content={post}
|
||||||
dropdownComponent={<PostDropdown content={post} />}
|
dropdownComponent={<PostDropdown content={post} />}
|
||||||
/>
|
/>
|
||||||
<PostDisplay post={post} currentAccount={currentAccount} />
|
<PostDisplay post={post} currentAccount={currentAccount} isLoggedIn={isLoggedIn} />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,7 @@ import {
|
|||||||
getUser,
|
getUser,
|
||||||
getIsFollowing,
|
getIsFollowing,
|
||||||
getIsMuted,
|
getIsMuted,
|
||||||
getFollowers,
|
|
||||||
getFollowing,
|
|
||||||
} from '../../../providers/steem/dsteem';
|
} from '../../../providers/steem/dsteem';
|
||||||
import { decryptKey } from '../../../utils/crypto';
|
|
||||||
import { getDigitPinCode } from '../../../providers/steem/auth';
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import { default as ROUTES } from '../../../constants/routeNames';
|
import { default as ROUTES } from '../../../constants/routeNames';
|
||||||
|