diff --git a/src/assets/account@2x.png b/src/assets/account@2x.png
deleted file mode 100755
index 17834c364..000000000
Binary files a/src/assets/account@2x.png and /dev/null differ
diff --git a/src/assets/account_selected@2x.png b/src/assets/account_selected@2x.png
deleted file mode 100755
index 17834c364..000000000
Binary files a/src/assets/account_selected@2x.png and /dev/null differ
diff --git a/src/assets/add@2x.png b/src/assets/add@2x.png
deleted file mode 100755
index 3a6974e07..000000000
Binary files a/src/assets/add@2x.png and /dev/null differ
diff --git a/src/assets/add_selected@2x.png b/src/assets/add_selected@2x.png
deleted file mode 100755
index 3a6974e07..000000000
Binary files a/src/assets/add_selected@2x.png and /dev/null differ
diff --git a/src/assets/avatar_default.png b/src/assets/avatar_default.png
index 51f9309ec..bc0156133 100755
Binary files a/src/assets/avatar_default.png and b/src/assets/avatar_default.png differ
diff --git a/src/assets/back@2x.png b/src/assets/back@2x.png
deleted file mode 100755
index 47dcadb58..000000000
Binary files a/src/assets/back@2x.png and /dev/null differ
diff --git a/src/assets/back_selected@2x.png b/src/assets/back_selected@2x.png
deleted file mode 100755
index 47dcadb58..000000000
Binary files a/src/assets/back_selected@2x.png and /dev/null differ
diff --git a/src/assets/close_selected.png b/src/assets/close_selected.png
deleted file mode 100755
index c6805cc11..000000000
Binary files a/src/assets/close_selected.png and /dev/null differ
diff --git a/src/assets/dark_cover_image.png b/src/assets/dark_cover_image.png
index 93c05a753..cdcdf788d 100755
Binary files a/src/assets/dark_cover_image.png and b/src/assets/dark_cover_image.png differ
diff --git a/src/assets/default_cover_image.png b/src/assets/default_cover_image.png
old mode 100644
new mode 100755
index 3ae967a70..b4272ebdd
Binary files a/src/assets/default_cover_image.png and b/src/assets/default_cover_image.png differ
diff --git a/src/assets/drawer-cover.png b/src/assets/drawer-cover.png
deleted file mode 100644
index 1308aa528..000000000
Binary files a/src/assets/drawer-cover.png and /dev/null differ
diff --git a/src/assets/esteem@2x.png b/src/assets/esteem@2x.png
old mode 100644
new mode 100755
index 7f5eb2d45..a42ed5c0a
Binary files a/src/assets/esteem@2x.png and b/src/assets/esteem@2x.png differ
diff --git a/src/assets/esteem_background_logo.png b/src/assets/esteem_background_logo.png
deleted file mode 100755
index 87a5896dd..000000000
Binary files a/src/assets/esteem_background_logo.png and /dev/null differ
diff --git a/src/assets/esteem_logo_transparent.png b/src/assets/esteem_logo_transparent.png
index 31febb5a3..3e908f65a 100755
Binary files a/src/assets/esteem_logo_transparent.png and b/src/assets/esteem_logo_transparent.png differ
diff --git a/src/assets/esteem_selected@2x.png b/src/assets/esteem_selected@2x.png
deleted file mode 100644
index 7f5eb2d45..000000000
Binary files a/src/assets/esteem_selected@2x.png and /dev/null differ
diff --git a/src/assets/esteem_transparent@2x.png b/src/assets/esteem_transparent@2x.png
old mode 100644
new mode 100755
index 85e459525..2e1090f36
Binary files a/src/assets/esteem_transparent@2x.png and b/src/assets/esteem_transparent@2x.png differ
diff --git a/src/assets/feed@2x.png b/src/assets/feed@2x.png
deleted file mode 100755
index 3c274180b..000000000
Binary files a/src/assets/feed@2x.png and /dev/null differ
diff --git a/src/assets/feed_selected@2x.png b/src/assets/feed_selected@2x.png
deleted file mode 100755
index 3c274180b..000000000
Binary files a/src/assets/feed_selected@2x.png and /dev/null differ
diff --git a/src/assets/keep_calm.png b/src/assets/keep_calm.png
index 054ab617e..f40f47d00 100755
Binary files a/src/assets/keep_calm.png and b/src/assets/keep_calm.png differ
diff --git a/src/assets/love_mascot.png b/src/assets/love_mascot.png
old mode 100644
new mode 100755
index 1e74eab40..b37150d7d
Binary files a/src/assets/love_mascot.png and b/src/assets/love_mascot.png differ
diff --git a/src/assets/menu@2x.png b/src/assets/menu@2x.png
deleted file mode 100755
index 0c76af2f0..000000000
Binary files a/src/assets/menu@2x.png and /dev/null differ
diff --git a/src/assets/menu_selected@2x.png b/src/assets/menu_selected@2x.png
deleted file mode 100755
index 0c76af2f0..000000000
Binary files a/src/assets/menu_selected@2x.png and /dev/null differ
diff --git a/src/assets/no_image.png b/src/assets/no_image.png
old mode 100644
new mode 100755
index 2c71f20d9..4a0b0a8d7
Binary files a/src/assets/no_image.png and b/src/assets/no_image.png differ
diff --git a/src/assets/no_post.png b/src/assets/no_post.png
old mode 100644
new mode 100755
index 7c32f505b..7c53b1698
Binary files a/src/assets/no_post.png and b/src/assets/no_post.png differ
diff --git a/src/assets/notification@2x.png b/src/assets/notification@2x.png
deleted file mode 100755
index 03eb2ccb7..000000000
Binary files a/src/assets/notification@2x.png and /dev/null differ
diff --git a/src/assets/notification_selected@2x.png b/src/assets/notification_selected@2x.png
deleted file mode 100755
index 03eb2ccb7..000000000
Binary files a/src/assets/notification_selected@2x.png and /dev/null differ
diff --git a/src/assets/search@2x.png b/src/assets/search@2x.png
deleted file mode 100755
index 278f6d017..000000000
Binary files a/src/assets/search@2x.png and /dev/null differ
diff --git a/src/assets/search_selected@2x.png b/src/assets/search_selected@2x.png
deleted file mode 100755
index 278f6d017..000000000
Binary files a/src/assets/search_selected@2x.png and /dev/null differ
diff --git a/src/assets/side_menu_background.png b/src/assets/side_menu_background.png
index 032fc973e..b4d961bfa 100755
Binary files a/src/assets/side_menu_background.png and b/src/assets/side_menu_background.png differ
diff --git a/src/assets/steem_connect.png b/src/assets/steem_connect.png
old mode 100644
new mode 100755
index b7b8bd7f1..e77a9b0a2
Binary files a/src/assets/steem_connect.png and b/src/assets/steem_connect.png differ
diff --git a/src/assets/user.png b/src/assets/user.png
deleted file mode 100644
index 23f677e13..000000000
Binary files a/src/assets/user.png and /dev/null differ
diff --git a/src/assets/wallet@2x.png b/src/assets/wallet@2x.png
deleted file mode 100755
index 9c93ddf8b..000000000
Binary files a/src/assets/wallet@2x.png and /dev/null differ
diff --git a/src/assets/wallet_selected@2x.png b/src/assets/wallet_selected@2x.png
deleted file mode 100755
index 683924fa5..000000000
Binary files a/src/assets/wallet_selected@2x.png and /dev/null differ
diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js
index 2074fbccd..fb746d59e 100644
--- a/src/components/comments/container/commentsContainer.js
+++ b/src/components/comments/container/commentsContainer.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { withNavigation } from 'react-navigation';
+import { connect } from 'react-redux';
import { getComments } from '../../../providers/steem/dsteem';
@@ -59,15 +60,20 @@ class CommentsContainer extends Component {
render() {
const { comments } = this.state;
-
+ const { isLoggedIn } = this.props;
return (
);
}
}
-export default withNavigation(CommentsContainer);
+const mapStateToProps = state => ({
+ isLoggedIn: state.application.isLoggedIn,
+});
+
+export default withNavigation(connect(mapStateToProps)(CommentsContainer));
diff --git a/src/components/comments/view/commentsView.js b/src/components/comments/view/commentsView.js
index 963198a51..73c074b10 100644
--- a/src/components/comments/view/commentsView.js
+++ b/src/components/comments/view/commentsView.js
@@ -39,6 +39,7 @@ class CommentsView extends Component {
commentNumber,
handleOnReplyPress,
isProfilePreview,
+ isLoggedIn,
} = this.props;
// commentNumber === 8 && alert('sekkiz:');
return (
@@ -73,6 +74,7 @@ class CommentsView extends Component {
name="reply"
onPress={() => handleOnReplyPress && handleOnReplyPress(item)}
iconType="FontAwesome"
+ disabled={!isLoggedIn}
/>
diff --git a/src/components/iconButton/view/iconButtonView.js b/src/components/iconButton/view/iconButtonView.js
index e2e1484ca..cb37ad685 100644
--- a/src/components/iconButton/view/iconButtonView.js
+++ b/src/components/iconButton/view/iconButtonView.js
@@ -5,9 +5,9 @@ import { Icon } from '../../icon';
import styles from './iconButtonStyles';
/* Props
-* ------------------------------------------------
-* @prop { type } name - Description....
-*/
+ * ------------------------------------------------
+ * @prop { type } name - Description....
+ */
const IconButton = ({
name,
@@ -18,12 +18,14 @@ const IconButton = ({
style,
iconStyle,
iconType,
+ disabled,
}) => (
onPress && onPress()}
underlayColor={backgroundColor || 'white'}
+ disabled={disabled}
>
{
- const { currentAccount, content } = this.props;
-
- reblog(currentAccount, content.author, content.permlink)
- .then((result) => {
- Alert.alert('Success', 'Rebloged!');
- })
- .catch((error) => {
- if (error.jse_shortmsg && String(error.jse_shortmsg).indexOf('has already reblogged')) {
- Alert.alert('You already reblogged!');
- } else {
- Alert.alert('Failed!');
- }
- });
+ _reblog = () => {
+ const { currentAccount, content, isLoggedIn } = this.props;
+ if (isLoggedIn) {
+ reblog(currentAccount, content.author, content.permlink)
+ .then((result) => {
+ Alert.alert('Success', 'Rebloged!');
+ })
+ .catch((error) => {
+ if (error.jse_shortmsg && String(error.jse_shortmsg).indexOf('has already reblogged')) {
+ Alert.alert('You already reblogged!');
+ } else {
+ Alert.alert('Failed!');
+ }
+ });
+ }
};
_replyNavigation = () => {
- const { navigation, content } = this.props;
-
- navigation.navigate({
- routeName: ROUTES.SCREENS.EDITOR,
- params: {
- isReply: true,
- post: content,
- },
- });
+ const { navigation, content, isLoggedIn } = this.props;
+ if (isLoggedIn) {
+ navigation.navigate({
+ routeName: ROUTES.SCREENS.EDITOR,
+ params: {
+ isReply: true,
+ post: content,
+ },
+ });
+ }
};
render() {
@@ -95,6 +97,7 @@ class PostDropdownContainer extends Component {
const mapStateToProps = state => ({
selectedApi: state.application.api,
+ isLoggedIn: state.application.isLoggedIn,
currentAccount: state.account.currentAccount,
});
export default withNavigation(connect(mapStateToProps)(PostDropdownContainer));
diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js
index 4277df467..5eccd2aa9 100644
--- a/src/components/postView/view/postDisplayView.js
+++ b/src/components/postView/view/postDisplayView.js
@@ -57,6 +57,7 @@ class PostDisplayView extends Component {
handleOnEditPress,
handleOnReplyPress,
handleOnVotersPress,
+ isLoggedIn,
post,
} = this.props;
@@ -97,6 +98,7 @@ class PostDisplayView extends Component {
name="reply"
onPress={() => handleOnReplyPress && handleOnReplyPress()}
iconType="FontAwesome"
+ disabled={!isLoggedIn}
/>
diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js
index f4dd8d813..24bb45488 100644
--- a/src/components/posts/view/postsView.js
+++ b/src/components/posts/view/postsView.js
@@ -35,6 +35,17 @@ class PostsView extends Component {
this._loadPosts();
}
+ componentWillReceiveProps(nextProps) {
+ const { currentAccountUsername } = this.props;
+
+ if (
+ currentAccountUsername !== nextProps.currentAccountUsername
+ && nextProps.currentAccountUsername
+ ) {
+ this._loadPosts();
+ }
+ }
+
_loadPosts = (filter = null) => {
const { getFor, tag, currentAccountUsername } = this.props;
let options;
diff --git a/src/components/sideMenu/container/sideMenuContainer.js b/src/components/sideMenu/container/sideMenuContainer.js
index e0f155091..776d37dfc 100644
--- a/src/components/sideMenu/container/sideMenuContainer.js
+++ b/src/components/sideMenu/container/sideMenuContainer.js
@@ -29,27 +29,37 @@ class SideMenuContainer extends Component {
}
// Component Life Cycle Functions
-
componentWillMount() {
- const accounts = [];
+ const { otherAccounts } = this.props;
- getUserData().then((userData) => {
- 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 });
- });
+ this._createUserList(otherAccounts);
}
+ 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
_navigateToRoute = (route = null) => {
@@ -61,11 +71,10 @@ class SideMenuContainer extends Component {
_switchAccount = (anchor = null) => {
const { dispatch, currentAccount, navigation } = this.props;
- const username = anchor.slice(1);
- if (username !== currentAccount.name) {
- switchAccount(username).then((accountData) => {
- const realmData = getUserDataWithUsername(username);
+ if (anchor !== currentAccount.name) {
+ switchAccount(anchor).then((accountData) => {
+ const realmData = getUserDataWithUsername(anchor);
const _currentAccount = accountData;
_currentAccount.username = _currentAccount.name;
@@ -103,7 +112,8 @@ class SideMenuContainer extends Component {
const mapStateToProps = state => ({
isLoggedIn: state.application.isLoggedIn,
- currentAccount: state.account.currentAccount || {},
+ currentAccount: state.account.currentAccount,
+ otherAccounts: state.account.otherAccounts,
});
export default connect(mapStateToProps)(SideMenuContainer);
diff --git a/src/components/sideMenu/view/sideMenuView.js b/src/components/sideMenu/view/sideMenuView.js
index 4f2fcae5c..9db5fa428 100644
--- a/src/components/sideMenu/view/sideMenuView.js
+++ b/src/components/sideMenu/view/sideMenuView.js
@@ -75,7 +75,7 @@ class SideMenuView extends Component {
if (item.route) {
navigateToRoute(item.route);
} else {
- switchAccount(item.name);
+ switchAccount(item.username);
}
};
diff --git a/src/components/userAvatar/view/userAvatarView.js b/src/components/userAvatar/view/userAvatarView.js
index 808f36b78..73eae7b98 100644
--- a/src/components/userAvatar/view/userAvatarView.js
+++ b/src/components/userAvatar/view/userAvatarView.js
@@ -10,7 +10,7 @@ const DEFAULT_IMAGE = require('../../../assets/avatar_default.png');
*/
const UserAvatarView = ({ username, size, style }) => {
- const imageSize = size === 'xl' ? 'large' : 'medium';
+ const imageSize = size === 'xl' ? 'large' : 'small';
const _avatar = username
? { uri: `https://steemitimages.com/u/${username}/avatar/${imageSize}` }
: DEFAULT_IMAGE;
diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js
index cfbc9c547..62f631bc4 100644
--- a/src/screens/application/container/applicationContainer.js
+++ b/src/screens/application/container/applicationContainer.js
@@ -97,19 +97,17 @@ class ApplicationContainer extends Component {
await getAuthStatus().then((res) => {
authStatus = res;
currentUsername = res.currentUsername;
- if (authStatus.isLoggedIn) {
- getUserData().then((userData) => {
- if (userData.length > 0) {
- realmData = userData;
+ getUserData().then((userData) => {
+ if (userData.length > 0) {
+ realmData = userData;
- userData.forEach((accountData) => {
- dispatch(
- addOtherAccount({ username: accountData.username }),
- );
- });
- }
- });
- }
+ userData.forEach((accountData) => {
+ dispatch(
+ addOtherAccount({ username: accountData.username }),
+ );
+ });
+ }
+ });
});
if (realmData) {
diff --git a/src/screens/post/container/postContainer.js b/src/screens/post/container/postContainer.js
index 8619f3d27..5017f3e31 100644
--- a/src/screens/post/container/postContainer.js
+++ b/src/screens/post/container/postContainer.js
@@ -47,10 +47,17 @@ class PostContainer extends Component {
};
render() {
- const { currentAccount } = this.props;
+ const { currentAccount, isLoggedIn } = this.props;
const { post, error } = this.state;
- return ;
+ return (
+
+ );
}
}
diff --git a/src/screens/post/screen/postScreen.js b/src/screens/post/screen/postScreen.js
index 874990e7a..5f974ce25 100644
--- a/src/screens/post/screen/postScreen.js
+++ b/src/screens/post/screen/postScreen.js
@@ -23,7 +23,7 @@ class PostScreen extends Component {
// Component Functions
render() {
- const { post, currentAccount } = this.props;
+ const { post, currentAccount, isLoggedIn } = this.props;
return (
@@ -33,7 +33,7 @@ class PostScreen extends Component {
content={post}
dropdownComponent={}
/>
-
+
);
}
diff --git a/src/screens/profile/container/profileContainer.js b/src/screens/profile/container/profileContainer.js
index 8b8bd4f0f..022f07f9f 100644
--- a/src/screens/profile/container/profileContainer.js
+++ b/src/screens/profile/container/profileContainer.js
@@ -14,11 +14,7 @@ import {
getUser,
getIsFollowing,
getIsMuted,
- getFollowers,
- getFollowing,
} from '../../../providers/steem/dsteem';
-import { decryptKey } from '../../../utils/crypto';
-import { getDigitPinCode } from '../../../providers/steem/auth';
// Constants
import { default as ROUTES } from '../../../constants/routeNames';