diff --git a/src/component/AppNavigator.js b/src/component/AppNavigator.js
index 71cf69a..4db09a6 100644
--- a/src/component/AppNavigator.js
+++ b/src/component/AppNavigator.js
@@ -6,6 +6,7 @@ import DrawerContent from 'component/drawerContent';
import FilePage from 'page/file';
import FirstRunScreen from 'page/firstRun';
import PublishPage from 'page/publish';
+import PublishesPage from 'page/publishes';
import RewardsPage from 'page/rewards';
import TagPage from 'page/tag';
import TrendingPage from 'page/trending';
@@ -162,6 +163,12 @@ const drawer = createDrawerNavigator(
drawerIcon: ({ tintColor }) => ,
},
},
+ Publishes: {
+ screen: PublishesPage,
+ navigationOptions: {
+ drawerIcon: ({ tintColor }) => ,
+ },
+ },
Rewards: {
screen: RewardsPage,
navigationOptions: {
diff --git a/src/component/fileListItem/view.js b/src/component/fileListItem/view.js
index fa24157..8301581 100644
--- a/src/component/fileListItem/view.js
+++ b/src/component/fileListItem/view.js
@@ -58,6 +58,7 @@ class FileListItem extends React.PureComponent {
onPress,
navigation,
thumbnail,
+ hideChannel,
title,
} = this.props;
@@ -115,7 +116,7 @@ class FileListItem extends React.PureComponent {
{this.formatTitle(title) || this.formatTitle(name)}
)}
- {channel && (
+ {channel && !hideChannel && (
{
+ const { pushDrawerStack, setPlayerVisible } = this.props;
+
+ pushDrawerStack();
+ setPlayerVisible();
+
+ NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
+ NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
+ NativeModules.Gallery.getVideos().then(videos => this.setState({ videos }));
+ };
+
getNewUri(name, channel) {
const { resolveUri } = this.props;
// If they are midway through a channel creation, treat it as anonymous until it completes
@@ -212,17 +223,6 @@ class PublishPage extends React.PureComponent {
this.setState({ publishStarted: true }, () => publish(publishParams));
};
- onComponentFocused = () => {
- const { pushDrawerStack, setPlayerVisible } = this.props;
-
- pushDrawerStack();
- setPlayerVisible();
-
- NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
- NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
- NativeModules.Gallery.getVideos().then(videos => this.setState({ videos }));
- };
-
componentDidMount() {
this.onComponentFocused();
}
diff --git a/src/page/publishes/index.js b/src/page/publishes/index.js
new file mode 100644
index 0000000..3989253
--- /dev/null
+++ b/src/page/publishes/index.js
@@ -0,0 +1,21 @@
+import { connect } from 'react-redux';
+import { doCheckPendingPublishes, selectMyClaimUrisWithoutChannels, selectIsFetchingClaimListMine } from 'lbry-redux';
+import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
+import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
+import PublishesPage from './view';
+
+const select = state => ({
+ uris: selectMyClaimUrisWithoutChannels(state),
+ fetching: selectIsFetchingClaimListMine(state),
+});
+
+const perform = dispatch => ({
+ checkPendingPublishes: () => dispatch(doCheckPendingPublishes()),
+ pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_PUBLISHES)),
+ setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
+});
+
+export default connect(
+ select,
+ perform
+)(PublishesPage);
diff --git a/src/page/publishes/view.js b/src/page/publishes/view.js
new file mode 100644
index 0000000..3a09d06
--- /dev/null
+++ b/src/page/publishes/view.js
@@ -0,0 +1,80 @@
+import React from 'react';
+import { ActivityIndicator, FlatList, Text, TouchableOpacity, View } from 'react-native';
+import Button from 'component/button';
+import Colors from 'styles/colors';
+import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
+import FileListItem from 'component/fileListItem';
+import FloatingWalletBalance from 'component/floatingWalletBalance';
+import UriBar from 'component/uriBar';
+import publishStyle from 'styles/publish';
+import { __ } from 'utils/helper';
+
+class PublishesPage extends React.PureComponent {
+ didFocusListener;
+
+ componentWillMount() {
+ const { navigation } = this.props;
+ this.didFocusListener = navigation.addListener('didFocus', this.onComponentFocused);
+ }
+
+ componentWillUnmount() {
+ if (this.didFocusListener) {
+ this.didFocusListener.remove();
+ }
+ }
+
+ onComponentFocused = () => {
+ const { checkPendingPublishes, pushDrawerStack, setPlayerVisible } = this.props;
+
+ pushDrawerStack();
+ setPlayerVisible();
+ checkPendingPublishes();
+ };
+
+ render() {
+ const { fetching, navigation, uris } = this.props;
+
+ return (
+
+
+ {fetching && (
+
+
+
+ )}
+
+ {!fetching && (!uris || uris.length === 0) && (
+
+
+ {__('It looks like you have not published anything to LBRY yet.')}
+
+
+ )}
+
+ {uris && uris.length > 0 && (
+ (
+
+ )}
+ data={uris}
+ keyExtractor={(item, index) => item}
+ />
+ )}
+
+
+
+ );
+ }
+}
+
+export default PublishesPage;
diff --git a/src/styles/publish.js b/src/styles/publish.js
index f324d4c..b2db23d 100644
--- a/src/styles/publish.js
+++ b/src/styles/publish.js
@@ -326,6 +326,49 @@ const publishStyle = StyleSheet.create({
fontSize: 14,
marginLeft: 8,
},
+ centered: {
+ position: 'absolute',
+ left: 0,
+ right: 0,
+ top: 60,
+ bottom: 0,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ noPublishes: {
+ position: 'absolute',
+ left: 0,
+ right: 0,
+ top: 60,
+ bottom: 0,
+ alignItems: 'center',
+ justifyContent: 'center',
+ padding: 16,
+ },
+ noPublishText: {
+ fontFamily: 'Inter-UI-Regular',
+ fontSize: 16,
+ },
+ publishNowButton: {
+ alignSelf: 'center',
+ backgroundColor: Colors.LbryGreen,
+ marginTop: 16,
+ },
+ publishesList: {
+ flex: 1,
+ marginTop: 60,
+ },
+ publishesScrollPadding: {
+ paddingBottom: 16,
+ },
+ listItem: {
+ flex: 1,
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ marginTop: 8,
+ marginLeft: 8,
+ marginRight: 8,
+ },
});
export default publishStyle;