From 5b6a889d6828ff67d235149387cd5fc20bc3758f Mon Sep 17 00:00:00 2001 From: u-e Date: Tue, 18 Dec 2018 13:09:33 +0300 Subject: [PATCH] anhances post according to new user when switch --- src/components/posts/view/postsView.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 09d4d2448..6b4062185 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -42,7 +42,19 @@ class PostsView extends Component { currentAccountUsername !== nextProps.currentAccountUsername && nextProps.currentAccountUsername ) { - this._loadPosts(); + // Set all initial data (New user new rules) + this.setState({ + posts: [], + startAuthor: '', + startPermlink: '', + refreshing: false, + isLoading: false, + isPostsLoading: false, + isHideImage: false, + selectedFilterIndex: 0, + }, () => { + this._loadPosts(); + }); } }