ongoing pre-beta tasks

This commit is contained in:
Akinwale Ariwodola 2018-09-04 05:21:26 +01:00
parent 05531e0bc5
commit 6d6c749338
11 changed files with 45 additions and 15 deletions

9
app/package-lock.json generated
View file

@ -3990,8 +3990,8 @@
} }
}, },
"lbryinc": { "lbryinc": {
"version": "github:lbryio/lbryinc#7910b565d7edda16be1c9d291f296982261ba60a", "version": "github:lbryio/lbryinc#f2fff2a331578aef84eb77c108f976967afc50e0",
"from": "github:lbryio/lbryinc#phone-verification", "from": "github:lbryio/lbryinc",
"requires": { "requires": {
"lbry-redux": "github:lbryio/lbry-redux#31f7afa8a37f5741dac01fc1ecdf153f3bed95dc", "lbry-redux": "github:lbryio/lbry-redux#31f7afa8a37f5741dac01fc1ecdf153f3bed95dc",
"reselect": "^3.0.0" "reselect": "^3.0.0"
@ -5315,9 +5315,8 @@
} }
}, },
"react-native-phone-input": { "react-native-phone-input": {
"version": "0.2.1", "version": "github:lbryio/react-native-phone-input#60fdef484e8bf27328c7fb6a203baab9eb9cd4a1",
"resolved": "https://registry.npmjs.org/react-native-phone-input/-/react-native-phone-input-0.2.1.tgz", "from": "github:lbryio/react-native-phone-input",
"integrity": "sha1-rGhSoeo32NWP+D3tUtGNe2MD5mc=",
"requires": { "requires": {
"google-libphonenumber": "^2.0.9", "google-libphonenumber": "^2.0.9",
"lodash": "^4.17.4", "lodash": "^4.17.4",

View file

@ -16,7 +16,7 @@
"react-native-fast-image": "^5.0.3", "react-native-fast-image": "^5.0.3",
"react-native-fetch-blob": "^0.10.8", "react-native-fetch-blob": "^0.10.8",
"react-native-image-zoom-viewer": "^2.2.5", "react-native-image-zoom-viewer": "^2.2.5",
"react-native-phone-input": "^0.2.1", "react-native-phone-input": "lbryio/react-native-phone-input",
"react-native-vector-icons": "^5.0.0", "react-native-vector-icons": "^5.0.0",
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android", "react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
"react-navigation": "^2.12.1", "react-navigation": "^2.12.1",

View file

@ -5,8 +5,8 @@ import {
makeSelectMetadataForUri, makeSelectMetadataForUri,
makeSelectFileInfoForUri, makeSelectFileInfoForUri,
makeSelectIsUriResolving, makeSelectIsUriResolving,
selectRewardContentClaimIds
} from 'lbry-redux'; } from 'lbry-redux';
import { selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from '../../redux/selectors/settings'; import { selectShowNsfw } from '../../redux/selectors/settings';
import FileItem from './view'; import FileItem from './view';

View file

@ -3,8 +3,10 @@ import { normalizeURI } from 'lbry-redux';
import { NavigationActions } from 'react-navigation'; import { NavigationActions } from 'react-navigation';
import { NativeModules, Text, View, TouchableOpacity } from 'react-native'; import { NativeModules, Text, View, TouchableOpacity } from 'react-native';
import { navigateToUri } from '../../utils/helper'; import { navigateToUri } from '../../utils/helper';
import Colors from '../../styles/colors';
import FileItemMedia from '../fileItemMedia'; import FileItemMedia from '../fileItemMedia';
import FilePrice from '../filePrice'; import FilePrice from '../filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from '../link'; import Link from '../link';
import NsfwOverlay from '../nsfwOverlay'; import NsfwOverlay from '../nsfwOverlay';
import discoverStyle from '../../styles/discover'; import discoverStyle from '../../styles/discover';
@ -65,7 +67,10 @@ class FileItem extends React.PureComponent {
isResolvingUri={isResolvingUri} isResolvingUri={isResolvingUri}
style={mediaStyle} /> style={mediaStyle} />
<FilePrice uri={uri} style={discoverStyle.filePriceContainer} textStyle={discoverStyle.filePriceText} /> <FilePrice uri={uri} style={discoverStyle.filePriceContainer} textStyle={discoverStyle.filePriceText} />
<Text style={discoverStyle.fileItemName}>{title}</Text> <View style={isRewardContent ? discoverStyle.rewardTitleContainer : null}>
<Text style={[discoverStyle.fileItemName, discoverStyle.rewardTitle]}>{title}</Text>
{isRewardContent && <Icon style={discoverStyle.rewardIcon} name="award" size={20} />}
</View>
{channelName && {channelName &&
<Link style={discoverStyle.channelName} text={channelName} onPress={() => { <Link style={discoverStyle.channelName} text={channelName} onPress={() => {
const channelUri = normalizeURI(channelName); const channelUri = normalizeURI(channelName);

View file

@ -5,6 +5,7 @@ import {
selectFeaturedUris, selectFeaturedUris,
selectFetchingFeaturedUris selectFetchingFeaturedUris
} from 'lbry-redux'; } from 'lbry-redux';
import { doFetchRewardedContent } from 'lbryinc';
import DiscoverPage from './view'; import DiscoverPage from './view';
const select = state => ({ const select = state => ({
@ -15,6 +16,7 @@ const select = state => ({
const perform = dispatch => ({ const perform = dispatch => ({
fetchFeaturedUris: () => dispatch(doFetchFeaturedUris()), fetchFeaturedUris: () => dispatch(doFetchFeaturedUris()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
}); });
export default connect(select, perform)(DiscoverPage); export default connect(select, perform)(DiscoverPage);

View file

@ -41,7 +41,9 @@ class DiscoverPage extends React.PureComponent {
} }
}); });
this.props.fetchFeaturedUris(); const { fetchFeaturedUris, fetchRewardedContent } = this.props;
fetchFeaturedUris();
fetchRewardedContent();
} }
render() { render() {

View file

@ -9,9 +9,9 @@ import {
makeSelectClaimForUri, makeSelectClaimForUri,
makeSelectContentTypeForUri, makeSelectContentTypeForUri,
makeSelectMetadataForUri, makeSelectMetadataForUri,
selectRewardContentClaimIds,
selectBlackListedOutpoints, selectBlackListedOutpoints,
} from 'lbry-redux'; } from 'lbry-redux';
import { selectRewardContentClaimIds } from 'lbryinc';
import { doDeleteFile, doStopDownloadingFile } from '../../redux/actions/file'; import { doDeleteFile, doStopDownloadingFile } from '../../redux/actions/file';
import FilePage from './view'; import FilePage from './view';

View file

@ -2,6 +2,7 @@ import { connect } from 'react-redux';
import { doBalanceSubscribe, doNotify } from 'lbry-redux'; import { doBalanceSubscribe, doNotify } from 'lbry-redux';
import { import {
doAuthenticate, doAuthenticate,
doFetchRewardedContent,
doUserEmailToVerify, doUserEmailToVerify,
doUserEmailVerify, doUserEmailVerify,
doUserEmailVerifyFailure, doUserEmailVerifyFailure,
@ -18,8 +19,9 @@ const select = state => ({
const perform = dispatch => ({ const perform = dispatch => ({
authenticate: (appVersion, os) => dispatch(doAuthenticate(appVersion, os)), authenticate: (appVersion, os) => dispatch(doAuthenticate(appVersion, os)),
deleteCompleteBlobs: () => dispatch(doDeleteCompleteBlobs()),
balanceSubscribe: () => dispatch(doBalanceSubscribe()), balanceSubscribe: () => dispatch(doBalanceSubscribe()),
deleteCompleteBlobs: () => dispatch(doDeleteCompleteBlobs()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
notify: data => dispatch(doNotify(data)), notify: data => dispatch(doNotify(data)),
setEmailToVerify: email => dispatch(doUserEmailToVerify(email)), setEmailToVerify: email => dispatch(doUserEmailToVerify(email)),
verifyUserEmail: (token, recaptcha) => dispatch(doUserEmailVerify(token, recaptcha)), verifyUserEmail: (token, recaptcha) => dispatch(doUserEmailVerify(token, recaptcha)),

View file

@ -50,6 +50,8 @@ class SplashScreen extends React.PureComponent {
AsyncStorage.setItem('firstLaunchTime', String(moment().unix())); AsyncStorage.setItem('firstLaunchTime', String(moment().unix()));
} }
}); });
this.props.fetchRewardedContent();
} }
updateStatus() { updateStatus() {

View file

@ -107,10 +107,23 @@ const discoverStyle = StyleSheet.create({
height: '100%' height: '100%'
}, },
overlayText: { overlayText: {
color: '#ffffff', color: Colors.White,
fontSize: 14, fontSize: 14,
textAlign: 'center', textAlign: 'center',
fontFamily: 'Metropolis-Regular' fontFamily: 'Metropolis-Regular'
},
rewardTitleContainer: {
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-between'
},
rewardIcon: {
color: Colors.LbryGreen,
flex: 0.1,
textAlign: 'center'
},
rewardTitle: {
flex: 0.9
} }
}); });

View file

@ -78,7 +78,6 @@ public class LbrynetService extends PythonService {
String serviceDescription = "The LBRY service is running in the background."; String serviceDescription = "The LBRY service is running in the background.";
Context context = getApplicationContext(); Context context = getApplicationContext();
NotificationManager notificationManager = NotificationManager notificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -145,11 +144,17 @@ public class LbrynetService extends PythonService {
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy();
if (stopServiceReceiver != null) { if (stopServiceReceiver != null) {
unregisterReceiver(stopServiceReceiver); unregisterReceiver(stopServiceReceiver);
stopServiceReceiver = null; stopServiceReceiver = null;
} }
Context context = getApplicationContext();
NotificationManager notificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();
super.onDestroy();
serviceInstance = null; serviceInstance = null;
} }