diff --git a/src/components/editorElements/index.js b/src/components/editorElements/index.js
index 2131c2d1f..bb1a0050f 100644
--- a/src/components/editorElements/index.js
+++ b/src/components/editorElements/index.js
@@ -1,6 +1,5 @@
import SummaryArea from './summaryArea/view/summaryAreaView';
import TagArea from './tagArea/view/tagAreaView';
-import TextArea from './textArea/view/textAreaView';
import TitleArea from './titleArea/view/titleAreaView';
-export { SummaryArea, TagArea, TextArea, TitleArea };
+export { SummaryArea, TagArea, TitleArea };
diff --git a/src/components/editorElements/textArea/view/textAreaStyles.js b/src/components/editorElements/textArea/view/textAreaStyles.js
deleted file mode 100644
index d0375023e..000000000
--- a/src/components/editorElements/textArea/view/textAreaStyles.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import EStyleSheet from 'react-native-extended-stylesheet';
-
-export default EStyleSheet.create({
- container: {
- flex: 1,
- marginTop: 16,
- },
-});
diff --git a/src/components/editorElements/textArea/view/textAreaView.js b/src/components/editorElements/textArea/view/textAreaView.js
deleted file mode 100644
index 75120cae7..000000000
--- a/src/components/editorElements/textArea/view/textAreaView.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import React, { PureComponent } from 'react';
-// Constants
-
-// Components
-import { MarkdownEditor } from '../../../markdownEditor';
-
-export default class TextAreaView extends PureComponent {
- /* Props
- * ------------------------------------------------
- * @prop { type } name - Description....
- */
-
- constructor(props) {
- super(props);
- this.state = {};
- }
-
- // Component Life Cycles
-
- // Component Functions
-
- render() {
- return ;
- }
-}
diff --git a/src/components/editorElements/titleArea/view/titleAreaStyles.js b/src/components/editorElements/titleArea/view/titleAreaStyles.js
index e4323dfd0..ffc7ed28d 100644
--- a/src/components/editorElements/titleArea/view/titleAreaStyles.js
+++ b/src/components/editorElements/titleArea/view/titleAreaStyles.js
@@ -8,5 +8,6 @@ export default EStyleSheet.create({
fontFamily: '$editorFont',
textAlignVertical: 'top',
paddingVertical: 0,
+ backgroundColor: '$primaryBackgroundColor',
},
});
diff --git a/src/components/leaderboard/view/leaderboardStyles.js b/src/components/leaderboard/view/leaderboardStyles.js
index a3d240fcc..66f6847fa 100644
--- a/src/components/leaderboard/view/leaderboardStyles.js
+++ b/src/components/leaderboard/view/leaderboardStyles.js
@@ -30,4 +30,7 @@ export default EStyleSheet.create({
marginBottom: 10,
fontFamily: '$primaryFont',
},
+ listContentContainer: {
+ paddingBottom: 60,
+ },
});
diff --git a/src/components/leaderboard/view/leaderboardView.js b/src/components/leaderboard/view/leaderboardView.js
index e8ec2ede2..1d6946ecf 100644
--- a/src/components/leaderboard/view/leaderboardView.js
+++ b/src/components/leaderboard/view/leaderboardView.js
@@ -70,6 +70,7 @@ class LeaderboardView extends PureComponent {
ListEmptyComponent={}
onRefresh={() => fetchLeaderBoard()}
renderItem={({ item, index }) => this._renderItem(item, index)}
+ contentContainerStyle={styles.listContentContainer}
/>
diff --git a/src/components/markdownEditor/view/markdownEditorStyles.js b/src/components/markdownEditor/view/markdownEditorStyles.js
index 41abdd607..beb9179bd 100644
--- a/src/components/markdownEditor/view/markdownEditorStyles.js
+++ b/src/components/markdownEditor/view/markdownEditorStyles.js
@@ -14,6 +14,7 @@ export default EStyleSheet.create({
paddingBottom: 0, // On android side, textinput has default padding
paddingHorizontal: 16,
color: '$primaryBlack',
+ backgroundColor: '$primaryBackgroundColor',
fontFamily: '$editorFont',
textAlignVertical: 'top',
},
diff --git a/src/components/markdownEditor/view/markdownPreviewStyles.js b/src/components/markdownEditor/view/markdownPreviewStyles.js
index f92a3e28d..e5a89e9be 100644
--- a/src/components/markdownEditor/view/markdownPreviewStyles.js
+++ b/src/components/markdownEditor/view/markdownPreviewStyles.js
@@ -1,7 +1,6 @@
import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
- view: {},
codeBlock: {
fontFamily: 'Courier',
fontWeight: '500',
diff --git a/src/components/notification/view/notificationStyles.js b/src/components/notification/view/notificationStyles.js
index 9fc7c49c2..4751439fe 100644
--- a/src/components/notification/view/notificationStyles.js
+++ b/src/components/notification/view/notificationStyles.js
@@ -18,4 +18,7 @@ export default EStyleSheet.create({
justifyContent: 'center',
flex: 1,
},
+ listContentContainer: {
+ paddingBottom: 60,
+ },
});
diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js
index 547d731bc..4596f2075 100644
--- a/src/components/notification/view/notificationView.js
+++ b/src/components/notification/view/notificationView.js
@@ -175,6 +175,7 @@ class NotificationView extends PureComponent {
onEndReached={() => getActivities(null, selectedFilter, true)}
ListFooterComponent={this._renderFooterLoading}
ListEmptyComponent={}
+ contentContainerStyle={styles.listContentContainer}
refreshControl={
diff --git a/src/components/posts/view/postsStyles.js b/src/components/posts/view/postsStyles.js
index 9e5fad34f..a7e75b567 100644
--- a/src/components/posts/view/postsStyles.js
+++ b/src/components/posts/view/postsStyles.js
@@ -32,4 +32,7 @@ export default EStyleSheet.create({
width: 193,
height: 189,
},
+ placeholderWrapper: {
+ flex: 1,
+ },
});
diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js
index 3f45974fd..53d1f02bb 100644
--- a/src/components/posts/view/postsView.js
+++ b/src/components/posts/view/postsView.js
@@ -51,6 +51,9 @@ const PostsView = ({
const [isNoPost, setIsNoPost] = useState(false);
const [promotedPosts, setPromotedPosts] = useState([]);
const [scrollOffsetY, setScrollOffsetY] = useState(0);
+ const [selectedFilterValue, setSelectedFilterValue] = useState(
+ filterOptionsValue && filterOptionsValue[selectedFilterIndex],
+ );
const intl = useIntl();
useEffect(() => {
@@ -62,8 +65,6 @@ const PostsView = ({
};
fetchPromotePost();
_loadPosts();
- setRefreshing(false);
- setIsLoading(false);
}
}, [
_getPromotePosts,
@@ -81,8 +82,6 @@ const PostsView = ({
setPosts([]);
setStartAuthor('');
setStartPermlink('');
- setRefreshing(false);
- setIsLoading(false);
setSelectedFilterIndex(selectedOptionIndex || 0);
setIsNoPost(false);
@@ -102,20 +101,21 @@ const PostsView = ({
useEffect(() => {
if (!startAuthor && !startPermlink) {
- _loadPosts(
- filterOptions && filterOptions.length > 0 && filterOptionsValue[selectedFilterIndex],
- );
+ _loadPosts(selectedFilterValue);
}
}, [
_loadPosts,
filterOptions,
filterOptionsValue,
- selectedFilterIndex,
+ selectedFilterValue,
startAuthor,
startPermlink,
]);
const _handleOnDropdownSelect = async index => {
+ if (filterOptions && filterOptions.length > 0) {
+ await setSelectedFilterValue(filterOptionsValue[index]);
+ }
setSelectedFilterIndex(index);
setPosts([]);
setStartPermlink('');
@@ -145,25 +145,26 @@ const PostsView = ({
}, [currentAccountUsername]);
const _loadPosts = useCallback(
- async type => {
- if (isLoading) {
+ type => {
+ if (
+ isLoading ||
+ !isConnected ||
+ (!isLoggedIn && type === 'feed') ||
+ (!isLoggedIn && type === 'blog')
+ ) {
return;
- } else {
- setIsLoading(true);
}
- const filter =
- type ||
- (filterOptions && filterOptions.length > 0 && filterOptionsValue[selectedFilterIndex]);
- let options;
- const limit = 3;
-
- if (!isConnected) {
+ if (!isConnected && (refreshing || isLoading)) {
setRefreshing(false);
setIsLoading(false);
- return null;
+ return;
}
+ const filter = type || selectedFilterValue;
+ let options;
+ const limit = 3;
+
if (filter === 'feed' || filter === 'blog' || getFor === 'blog' || filter === 'reblogs') {
options = {
tag,
@@ -202,7 +203,7 @@ const PostsView = ({
}
}
- if (posts.length < 5) {
+ if (posts.length < 5 && pageType !== 'profiles') {
setFeedPosts(_posts);
}
@@ -233,8 +234,7 @@ const PostsView = ({
}
// Promoted post end
- if (refreshing) {
- } else if (!refreshing) {
+ if (!refreshing) {
setStartAuthor(result[result.length - 1] && result[result.length - 1].author);
setStartPermlink(result[result.length - 1] && result[result.length - 1].permlink);
}
@@ -252,16 +252,16 @@ const PostsView = ({
},
[
currentAccountUsername,
- filterOptions,
- filterOptionsValue,
getFor,
isConnected,
isLoading,
+ isLoggedIn,
nsfw,
+ pageType,
posts,
promotedPosts,
refreshing,
- selectedFilterIndex,
+ selectedFilterValue,
setFeedPosts,
startAuthor,
startPermlink,
@@ -295,7 +295,7 @@ const PostsView = ({
};
const _renderEmptyContent = () => {
- if (getFor === 'feed' && isLoginDone && !isLoggedIn) {
+ if ((selectedFilterValue === 'feed' || selectedFilterValue === 'blog') && !isLoggedIn) {
return (
+
-
+
);
};
@@ -369,7 +369,7 @@ const PostsView = ({
)
}
keyExtractor={(content, i) => `${get(content, 'permlink', '')}${i.toString()}`}
- onEndReached={_loadPosts}
+ onEndReached={() => _loadPosts()}
removeClippedSubviews
refreshing={refreshing}
onRefresh={_handleOnRefreshPosts}
diff --git a/src/components/profile/profileStyles.js b/src/components/profile/profileStyles.js
index 02944553c..270193b5d 100644
--- a/src/components/profile/profileStyles.js
+++ b/src/components/profile/profileStyles.js
@@ -60,4 +60,7 @@ export default EStyleSheet.create({
paddingHorizontal: 16,
paddingVertical: 5,
},
+ scrollContentContainer: {
+ paddingBottom: 60,
+ },
});
diff --git a/src/components/profile/profileView.js b/src/components/profile/profileView.js
index 82a1fb5f8..fb75b8c36 100644
--- a/src/components/profile/profileView.js
+++ b/src/components/profile/profileView.js
@@ -197,7 +197,10 @@ class ProfileView extends PureComponent {
style={styles.commentsTabBar}
>
{comments && comments.length > 0 ? (
-
+
)}
@@ -328,7 +332,7 @@ class UpvoteView extends Component {
size={20}
style={[styles.upvoteIcon, { color: '#007ee5' }]}
active={!isLoggedIn}
- iconType={iconType}
+ iconType="AntDesign"
name={iconName}
/>
@@ -356,7 +360,7 @@ class UpvoteView extends Component {
style={[styles.upvoteIcon, { color: '#ec8b88' }]}
active={!isLoggedIn}
iconType="AntDesign"
- name="downcircle"
+ name={downVoteIconName}
/>
diff --git a/src/components/wallet/view/walletStyles.js b/src/components/wallet/view/walletStyles.js
index 8dd70688a..5320a75d9 100644
--- a/src/components/wallet/view/walletStyles.js
+++ b/src/components/wallet/view/walletStyles.js
@@ -38,4 +38,7 @@ export default EStyleSheet.create({
scrollView: {
backgroundColor: '$primaryLightBackground',
},
+ scrollContentContainer: {
+ paddingBottom: 60,
+ },
});
diff --git a/src/components/wallet/view/walletView.js b/src/components/wallet/view/walletView.js
index f08c605a3..bdd9ba257 100644
--- a/src/components/wallet/view/walletView.js
+++ b/src/components/wallet/view/walletView.js
@@ -73,6 +73,7 @@ class WalletView extends PureComponent {
colors={['#fff']}
/>
}
+ contentContainerStyle={styles.scrollContentContainer}
>
{!walletData ? (
diff --git a/src/index.js b/src/index.js
index f4b57b5a6..1d8a54846 100755
--- a/src/index.js
+++ b/src/index.js
@@ -1,9 +1,9 @@
import React from 'react';
+import 'react-native-gesture-handler';
import { Provider, connect } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { IntlProvider } from 'react-intl';
import { useScreens } from 'react-native-screens';
-
import { flattenMessages } from './utils/flattenMessages';
import messages from './config/locales';
diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js
index 3db98c28b..29b97b4b8 100644
--- a/src/screens/editor/container/editorContainer.js
+++ b/src/screens/editor/container/editorContainer.js
@@ -96,9 +96,9 @@ class EditorContainer extends Component {
this.setState({
isEdit,
draftPost: {
- title: post.title,
- body: post.markdownBody,
- tags: post.json_metadata.tags,
+ title: get(post, 'title', ''),
+ body: get(post, 'markdownBody', ''),
+ tags: get(post, 'json_metadata.tags', []),
},
});
}
@@ -129,9 +129,9 @@ class EditorContainer extends Component {
if (result) {
this.setState({
draftPost: {
- body: result.body,
- title: result.title,
- tags: result.tags.split(','),
+ body: get(result, 'body', ''),
+ title: get(result, 'title', ''),
+ tags: get(result, 'tags', '').split(','),
},
});
}
diff --git a/src/screens/editor/screen/editorScreen.js b/src/screens/editor/screen/editorScreen.js
index d7deaebdd..ed9100d2a 100644
--- a/src/screens/editor/screen/editorScreen.js
+++ b/src/screens/editor/screen/editorScreen.js
@@ -14,6 +14,7 @@ import {
TextArea,
SummaryArea,
PostForm,
+ MarkdownEditor,
} from '../../../components';
// Styles
@@ -73,7 +74,9 @@ class EditorScreen extends Component {
isRemoveTag: true,
});
- if (initialEditor) initialEditor();
+ if (initialEditor) {
+ initialEditor();
+ }
};
_handleOnPressPreviewButton = () => {
@@ -229,7 +232,7 @@ class EditorScreen extends Component {
intl={intl}
/>
)}
-