Merge pull request #7 from lbryio/release-0.8.0
updates for next release
This commit is contained in:
commit
507c8f0394
3 changed files with 28 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Text, TouchableOpacity, View } from 'react-native';
|
||||
import { NativeModules, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { DEFAULT_FOLLOWED_TAGS } from 'lbry-redux';
|
||||
import Button from 'component/button';
|
||||
import Colors from 'styles/colors';
|
||||
|
@ -23,6 +23,7 @@ export default class ModalTagSelector extends React.PureComponent {
|
|||
}
|
||||
|
||||
this.props.doToggleTagFollow(tag);
|
||||
NativeModules.Firebase.track('tag_follow', { tag });
|
||||
};
|
||||
|
||||
handleRemoveTag = tag => {
|
||||
|
@ -31,6 +32,7 @@ export default class ModalTagSelector extends React.PureComponent {
|
|||
}
|
||||
|
||||
this.props.doToggleTagFollow(tag);
|
||||
NativeModules.Firebase.track('tag_unfollow', { tag });
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import {
|
||||
ActivityIndicator,
|
||||
Clipboard,
|
||||
DeviceEventEmitter,
|
||||
Image,
|
||||
NativeModules,
|
||||
Picker,
|
||||
|
@ -72,6 +73,7 @@ class PublishPage extends React.PureComponent {
|
|||
|
||||
// gallery videos
|
||||
videos: null,
|
||||
galleryThumbnailsChecked: false,
|
||||
|
||||
// camera
|
||||
cameraType: RNCamera.Constants.Type.back,
|
||||
|
@ -115,14 +117,20 @@ class PublishPage extends React.PureComponent {
|
|||
componentWillMount() {
|
||||
const { navigation } = this.props;
|
||||
this.didFocusListener = navigation.addListener('didFocus', this.onComponentFocused);
|
||||
DeviceEventEmitter.addListener('onGalleryThumbnailsChecked', this.handleGalleryThumbnailsChecked);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.didFocusListener) {
|
||||
this.didFocusListener.remove();
|
||||
}
|
||||
DeviceEventEmitter.removeListener('onGalleryThumbnailsChecked', this.handleGalleryThumbnailsChecked);
|
||||
}
|
||||
|
||||
handleGalleryThumbnailsChecked = () => {
|
||||
this.setState({ galleryThumbnailsChecked: true });
|
||||
};
|
||||
|
||||
onComponentFocused = () => {
|
||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||
|
||||
|
@ -513,16 +521,14 @@ class PublishPage extends React.PureComponent {
|
|||
|
||||
render() {
|
||||
const { balance, navigation, notify, publishFormValues } = this.props;
|
||||
const { thumbnailPath } = this.state;
|
||||
const { canUseCamera, currentPhase, galleryThumbnailsChecked, thumbnailPath, videos } = this.state;
|
||||
|
||||
let content;
|
||||
if (Constants.PHASE_SELECTOR === this.state.currentPhase) {
|
||||
if (Constants.PHASE_SELECTOR === currentPhase) {
|
||||
content = (
|
||||
<View style={publishStyle.gallerySelector}>
|
||||
<View style={publishStyle.actionsView}>
|
||||
{this.state.canUseCamera && (
|
||||
<RNCamera style={publishStyle.cameraPreview} type={RNCamera.Constants.Type.back} />
|
||||
)}
|
||||
{canUseCamera && <RNCamera style={publishStyle.cameraPreview} type={RNCamera.Constants.Type.back} />}
|
||||
<View style={publishStyle.actionsSubView}>
|
||||
<TouchableOpacity style={publishStyle.record} onPress={this.handleRecordVideoPressed}>
|
||||
<Icon name="video" size={48} color={Colors.White} />
|
||||
|
@ -542,12 +548,19 @@ class PublishPage extends React.PureComponent {
|
|||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{(!this.state.videos || !thumbnailPath) && (
|
||||
{(!videos || !thumbnailPath || !galleryThumbnailsChecked) && (
|
||||
<View style={publishStyle.loadingView}>
|
||||
<ActivityIndicator size="large" color={Colors.LbryGreen} />
|
||||
</View>
|
||||
)}
|
||||
{this.state.videos && thumbnailPath && (
|
||||
{thumbnailPath && (!videos || videos.length === 0) && (
|
||||
<View style={publishStyle.centered}>
|
||||
<Text style={publishStyle.noVideos}>
|
||||
We could not find any videos on your device. Take a photo or record a video to get started.
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{videos && thumbnailPath && galleryThumbnailsChecked && (
|
||||
<FlatGrid
|
||||
style={publishStyle.galleryGrid}
|
||||
itemDimension={134}
|
||||
|
|
|
@ -369,6 +369,11 @@ const publishStyle = StyleSheet.create({
|
|||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
},
|
||||
noVideos: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
});
|
||||
|
||||
export default publishStyle;
|
||||
|
|
Loading…
Reference in a new issue