Compare commits

..
19 changed files with 94 additions and 246 deletions

No files matched your search

+1 -9
View File
@@ -27,15 +27,7 @@ import {
createNavigationReducer,
} from 'react-navigation-redux-helpers';
import { connect } from 'react-redux';
import {
AppState,
BackHandler,
DeviceEventEmitter,
Linking,
NativeModules,
TextInput,
ToastAndroid,
} from 'react-native';
import { AppState, BackHandler, Linking, NativeModules, TextInput, ToastAndroid } from 'react-native';
import { selectDrawerStack } from 'redux/selectors/drawer';
import { SETTINGS, doDismissToast, doPopulateSharedUserState, doPreferenceGet, doToast, selectToast } from 'lbry-redux';
import {
+1 -5
View File
@@ -54,11 +54,7 @@ class DrawerContent extends React.PureComponent {
launchSignInFlow = () => {
// for now, sync flow (email, then password input) will be the default sign in flow
const { navigation } = this.props;
navigation.navigate({
routeName: 'Verification',
key: 'verification',
params: { syncFlow: true, signInFlow: true },
});
navigation.navigate({ routeName: 'Verification', key: 'verification', params: { syncFlow: true } });
};
render() {
+4 -12
View File
@@ -30,12 +30,12 @@ class FileItem extends React.PureComponent {
}
navigateToFileUri = () => {
const { claim, navigation, uri, shortUrl } = this.props;
const { navigation, uri, shortUrl } = this.props;
const normalizedUri = normalizeURI(uri);
if (NativeModules.Firebase) {
NativeModules.Firebase.track('explore_click', { uri: normalizedUri, short_url: shortUrl });
}
navigateToUri(navigation, shortUrl || uri, null, false, claim ? claim.permanent_url : null);
navigateToUri(navigation, shortUrl || uri);
};
render() {
@@ -66,9 +66,7 @@ class FileItem extends React.PureComponent {
let shouldHide = false;
if (blackListedOutpoints || filteredOutpoints) {
const outpointsToHide = !blackListedOutpoints
? filteredOutpoints
: blackListedOutpoints.concat(filteredOutpoints);
const outpointsToHide = blackListedOutpoints.concat(filteredOutpoints);
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
}
if (shouldHide) {
@@ -124,13 +122,7 @@ class FileItem extends React.PureComponent {
style={discoverStyle.channelName}
text={channelName}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri
);
navigateToUri(navigation, normalizeURI(shortChannelUri || fullChannelUri));
}}
/>
)}
+3 -11
View File
@@ -59,7 +59,7 @@ class FileListItem extends React.PureComponent {
if (featuredResult && !claim) {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH, params: { vanityUrl: uri.trim() } });
} else {
navigateToUri(navigation, shortUrl || uri, { autoplay }, false, claim ? claim.permanent_url : null);
navigateToUri(navigation, shortUrl || uri, { autoplay });
}
};
@@ -120,9 +120,7 @@ class FileListItem extends React.PureComponent {
shortChannelUri = signingChannel ? signingChannel.short_url : null;
if (blackListedOutpoints || filteredOutpoints) {
const outpointsToHide = !blackListedOutpoints
? filteredOutpoints
: blackListedOutpoints.concat(filteredOutpoints);
const outpointsToHide = blackListedOutpoints.concat(filteredOutpoints);
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
}
@@ -198,13 +196,7 @@ class FileListItem extends React.PureComponent {
style={fileListStyle.publisher}
text={channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri
);
navigateToUri(navigation, normalizeURI(shortChannelUri || fullChannelUri));
}}
/>
)}
@@ -57,7 +57,7 @@ class SuggestedSubscriptionItem extends React.PureComponent {
style={subscriptionsStyle.suggestedItemName}
numberOfLines={1}
text={claim.name}
onPress={() => navigateToUri(navigation, normalizeURI(shortUrl || uri), null, false, claim.permanent_url)}
onPress={() => navigateToUri(navigation, normalizeURI(shortUrl || uri))}
/>
)}
{tags && (
+2 -3
View File
@@ -82,8 +82,7 @@ class WalletSend extends React.PureComponent<Props> {
render() {
const { balance } = this.props;
const canSend =
this.state.address && this.state.amount > 0 && this.state.address.trim().length > 0 && this.state.addressValid;
const canSend = this.state.address && this.state.amount > 0 && this.state.address.trim().length > 0;
return (
<View style={walletStyle.card}>
@@ -95,7 +94,7 @@ class WalletSend extends React.PureComponent<Props> {
this.setState({
address: value,
addressChanged: true,
addressValid: value.trim().length === 0 || regexAddress.test(value),
addressValid: value.trim().length == 0 || regexAddress.test(value),
})
}
onBlur={this.handleAddressInputBlur}
+1 -5
View File
@@ -16,11 +16,7 @@ class WalletSignIn extends React.Component {
onSignInPressed = () => {
const { navigation } = this.props;
navigation.navigate({
routeName: 'Verification',
key: 'verification',
params: { syncFlow: true, signInFlow: true },
});
navigation.navigate({ routeName: 'Verification', key: 'verification', params: { syncFlow: true } });
};
render() {
+14 -14
View File
@@ -46,30 +46,30 @@ import { selectDrawerStack } from 'redux/selectors/drawer';
import FilePage from './view';
const select = (state, props) => {
const { uri, fullUri } = props.navigation.state.params;
const contentUri = fullUri || uri;
const selectProps = { uri: contentUri };
const selectProps = { uri: props.navigation.state.params.uri };
return {
balance: selectBalance(state),
blackListedOutpoints: selectBlackListedOutpoints(state),
channels: selectMyChannelClaims(state),
claim: makeSelectClaimForUri(contentUri)(state),
claim: makeSelectClaimForUri(selectProps.uri)(state),
drawerStack: selectDrawerStack(state),
isResolvingUri: makeSelectIsUriResolving(contentUri)(state),
contentType: makeSelectContentTypeForUri(contentUri)(state),
costInfo: makeSelectCostInfoForUri(contentUri)(state),
metadata: makeSelectMetadataForUri(contentUri)(state),
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
isResolvingUri: makeSelectIsUriResolving(selectProps.uri)(state),
contentType: makeSelectContentTypeForUri(selectProps.uri)(state),
costInfo: makeSelectCostInfoForUri(selectProps.uri)(state),
metadata: makeSelectMetadataForUri(selectProps.uri)(state),
// obscureNsfw: !selectShowNsfw(state),
// tab: makeSelectCurrentParam('tab')(state),
fileInfo: makeSelectFileInfoForUri(selectProps.uri)(state),
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
position: makeSelectContentPositionForUri(contentUri)(state),
channelUri: makeSelectChannelForClaimUri(selectProps.uri, true)(state),
position: makeSelectContentPositionForUri(selectProps.uri)(state),
purchasedUris: selectPurchasedUris(state),
failedPurchaseUris: selectFailedPurchaseUris(state),
myClaimUris: selectMyClaimUrisWithoutChannels(state),
purchaseUriErrorMessage: selectPurchaseUriErrorMessage(state),
streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state),
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
title: makeSelectTitleForUri(contentUri)(state),
streamingUrl: makeSelectStreamingUrlForUri(selectProps.uri)(state),
thumbnail: makeSelectThumbnailForUri(selectProps.uri)(state),
title: makeSelectTitleForUri(selectProps.uri)(state),
};
};
+3 -32
View File
@@ -6,7 +6,6 @@ import {
Alert,
DeviceEventEmitter,
Dimensions,
Image,
Linking,
NativeModules,
ScrollView,
@@ -740,7 +739,6 @@ class FilePage extends React.PureComponent {
const isWebViewable = mediaType === 'text';
const canOpen = isViewable && completed;
const localFileUri = this.localUriForFileInfo(fileInfo);
const unsupported = !isPlayable && !canOpen;
const openFile = () => {
if (mediaType === 'image') {
@@ -811,36 +809,15 @@ class FilePage extends React.PureComponent {
thumbnail={thumbnail}
/>
)}
{!unsupported &&
(!this.state.downloadButtonShown || this.state.downloadPressed) &&
!this.state.mediaLoaded && (
{(!this.state.downloadButtonShown || this.state.downloadPressed) && !this.state.mediaLoaded && (
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={filePageStyle.loading} />
)}
{unsupported && fileInfo && completed && (
<View style={filePageStyle.unsupportedContent}>
<Image
style={filePageStyle.unsupportedContentImage}
resizeMode={'stretch'}
source={require('../../assets/gerbil-happy.png')}
/>
<View style={filePageStyle.unspportedContentTextContainer}>
<Text style={filePageStyle.unsupportedContentTitle}>Unsupported Content</Text>
<Text style={filePageStyle.unsupportedContentText}>
Sorry, we are unable to display this content in the app. You can find the file named{' '}
<Text style={filePageStyle.unsupportedContentFilename}>{fileInfo.file_name}</Text> in your
downloads folder.
</Text>
</View>
</View>
)}
{((isPlayable && !completed && !canLoadMedia) ||
canOpen ||
(!completed && !this.state.streamingMode)) &&
!this.state.downloadPressed && (
<FileDownloadButton
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
uri={uri}
style={filePageStyle.downloadButton}
openFile={openFile}
isPlayable={isPlayable}
@@ -999,13 +976,7 @@ class FilePage extends React.PureComponent {
numberOfLines={1}
ellipsizeMode={'tail'}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri
);
navigateToUri(navigation, normalizeURI(shortChannelUri || fullChannelUri));
}}
/>
)}
+17 -13
View File
@@ -44,20 +44,24 @@ class FirstRunScreen extends React.PureComponent {
}
});
// FirstRun module should always be present (in order to detect first run status)
NativeModules.FirstRun.isFirstRun().then(firstRun => {
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
this.setState({ isFirstRun: firstRun });
if (NativeModules.FirstRun) {
NativeModules.FirstRun.isFirstRun().then(firstRun => {
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
this.setState({ isFirstRun: firstRun });
if (firstRun) {
NativeModules.Firebase.setCurrentScreen('First Run');
this.setState({ currentPage: FirstRunScreen.pages[0] });
} else {
// Not the first run. Navigate to the splash screen right away
this.launchSplashScreen();
}
});
if (firstRun) {
NativeModules.Firebase.setCurrentScreen('First Run');
this.setState({ currentPage: FirstRunScreen.pages[0] });
} else {
// Not the first run. Navigate to the splash screen right away
this.launchSplashScreen();
}
});
} else {
// The first run module was not detected. Go straight to the splash screen.
this.launchSplashScreen();
}
}
componentWillReceiveProps(nextProps) {
+2 -2
View File
@@ -142,7 +142,7 @@ class SearchPage extends React.PureComponent {
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
{showTagResult && (
<TouchableOpacity style={searchStyle.tagResultItem} onPress={() => this.handleTagResultPressed(query)}>
<Text style={searchStyle.tagResultTitle}>#{query.toLowerCase()}</Text>
<Text style={searchStyle.tagResultTitle}>#{query}</Text>
<Text style={searchStyle.tagResultDescription}>Explore content for this tag</Text>
</TouchableOpacity>
)}
@@ -152,7 +152,7 @@ class SearchPage extends React.PureComponent {
handleTagResultPressed = tag => {
const { navigation } = this.props;
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag } });
};
render() {
+1 -1
View File
@@ -140,7 +140,7 @@ class SettingsPage extends React.PureComponent {
<View style={settingsStyle.row}>
<View style={settingsStyle.switchText}>
<Text style={settingsStyle.label}>{__('Content Interests')}</Text>
<Text style={settingsStyle.label}>{__('Tags you follow')}</Text>
</View>
<View style={settingsStyle.switchContainer}>
<Switch
+16 -42
View File
@@ -1,7 +1,7 @@
import React from 'react';
import { Lbry, doPreferenceGet } from 'lbry-redux';
import { Lbryio } from 'lbryinc';
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
import { ActivityIndicator, Linking, NativeModules, Platform, Text, View } from 'react-native';
import { NavigationActions, StackActions } from 'react-navigation';
import { decode as atob } from 'base-64';
import { navigateToUri, transformUrl } from 'utils/helper';
@@ -52,10 +52,7 @@ class SplashScreen extends React.PureComponent {
});
navigation.dispatch(resetAction);
const launchUrl =
navigation.state.params && navigation.state.params.launchUrl
? navigation.state.params.launchUrl
: this.state.launchUrl;
const launchUrl = navigation.state.params ? navigation.state.params.launchUrl : this.state.launchUrl;
if (launchUrl) {
if (launchUrl.startsWith('lbry://?verify=')) {
let verification = {};
@@ -121,12 +118,6 @@ class SplashScreen extends React.PureComponent {
);
};
onNotificationTargetLaunch = evt => {
if (evt.url && evt.url.startsWith('lbry://')) {
this.setState({ launchUrl: evt.url });
}
};
finishSplashScreen = () => {
const {
authenticate,
@@ -158,9 +149,7 @@ class SplashScreen extends React.PureComponent {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.then(firebaseToken => authenticate(appVersion, Platform.OS, firebaseToken))
.catch(() => authenticate(appVersion, Platform.OS));
});
}
@@ -261,14 +250,6 @@ class SplashScreen extends React.PureComponent {
}, 1000);
}
componentWillMount() {
DeviceEventEmitter.addListener('onNotificationTargetLaunch', this.onNotificationTargetLaunch);
}
componentWillUnmount() {
DeviceEventEmitter.removeListener('onNotificationTargetLaunch', this.onNotificationTargetLaunch);
}
componentDidMount() {
NativeModules.Firebase.track('app_launch', null);
NativeModules.Firebase.setCurrentScreen('Splash');
@@ -278,26 +259,6 @@ class SplashScreen extends React.PureComponent {
if (url) {
this.setState({ launchUrl: url });
}
NativeModules.UtilityModule.getNotificationLaunchTarget().then(target => {
if (target) {
this.setState({ launchUrl: target });
}
// Only connect after checking initial launch url / notification launch target
Lbry.connect()
.then(() => {
this.updateStatus();
})
.catch(e => {
this.setState({
isLagging: true,
message: 'Connection Failure',
details:
'We could not establish a connection to the daemon. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.',
});
});
});
});
// Start measuring the first launch time from the splash screen
@@ -309,6 +270,19 @@ class SplashScreen extends React.PureComponent {
AsyncStorage.setItem('firstLaunchTime', String(moment().unix()));
}
});
Lbry.connect()
.then(() => {
this.updateStatus();
})
.catch(e => {
this.setState({
isLagging: true,
message: 'Connection Failure',
details:
'We could not establish a connection to the daemon. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.',
});
});
}
handleContinueAnywayPressed = () => {
+1 -2
View File
@@ -1,5 +1,5 @@
import { connect } from 'react-redux';
import { doToast, doPopulateSharedUserState } from 'lbry-redux';
import { doToast } from 'lbry-redux';
import {
doCheckSync,
doGetSync,
@@ -58,7 +58,6 @@ const perform = dispatch => ({
checkSync: () => dispatch(doCheckSync()),
verifyPhone: verificationCode => dispatch(doUserPhoneVerify(verificationCode)),
notify: data => dispatch(doToast(data)),
populateSharedUserState: settings => dispatch(doPopulateSharedUserState(settings)),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
setEmailToVerify: email => dispatch(doUserEmailToVerify(email)),
syncApply: (hash, data, password) => dispatch(doSyncApply(hash, data, password)),
@@ -112,7 +112,7 @@ class SyncVerifyPage extends React.PureComponent {
};
render() {
const { hasSyncedWallet, syncApplyIsPending, signInFlow } = this.props;
const { hasSyncedWallet, syncApplyIsPending } = this.props;
let paragraph;
if (!hasSyncedWallet) {
@@ -194,7 +194,7 @@ class SyncVerifyPage extends React.PureComponent {
<Button
style={rewardStyle.verificationButton}
theme={'light'}
text={signInFlow ? 'Use LBRY' : 'Enable sync'}
text={'Enable sync'}
onPress={this.onEnableSyncPressed}
/>
)}
+5 -30
View File
@@ -1,11 +1,10 @@
import React from 'react';
import { Lbry, doPreferenceGet } from 'lbry-redux';
import { Lbry } from 'lbry-redux';
import { ActivityIndicator, Linking, NativeModules, Text, TouchableOpacity, View } from 'react-native';
import { NavigationActions, StackActions } from 'react-navigation';
import AsyncStorage from '@react-native-community/async-storage';
import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import Icon from 'react-native-vector-icons/FontAwesome5';
import EmailVerifyPage from './internal/email-verify-page';
import ManualVerifyPage from './internal/manual-verify-page';
import PhoneVerifyPage from './internal/phone-verify-page';
@@ -20,7 +19,6 @@ class VerificationScreen extends React.PureComponent {
showSkip: false,
skipAccountConfirmed: false,
showBottomContainer: true,
signInFlow: false,
walletPassword: null,
isEmailVerificationPhase: false,
isEmailVerified: false,
@@ -29,9 +27,7 @@ class VerificationScreen extends React.PureComponent {
};
componentDidMount() {
const { user, navigation } = this.props;
const { signInFlow } = navigation.state.params;
this.setState({ signInFlow });
const { user } = this.props;
this.checkVerificationStatus(user);
NativeModules.Firebase.setCurrentScreen('Verification');
}
@@ -40,22 +36,8 @@ class VerificationScreen extends React.PureComponent {
this.setState({ isEmailVerificationPhase: value });
};
getUserSettings = () => {
const { populateSharedUserState } = this.props;
doPreferenceGet(
'shared',
preference => {
populateSharedUserState(preference);
},
error => {
/* failed */
}
);
};
checkVerificationStatus = user => {
const { deviceWalletSynced, getSync, navigation } = this.props;
const { deviceWalletSynced, navigation } = this.props;
const { syncFlow } = navigation.state.params;
this.setState(
@@ -75,13 +57,7 @@ class VerificationScreen extends React.PureComponent {
}
if (this.state.isEmailVerified && syncFlow && deviceWalletSynced) {
// retrieve user settings
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
navigation.goBack();
});
});
navigation.goBack();
}
} else {
if (this.state.isEmailVerified && !this.state.isIdentityVerified && !this.state.isRewardApproved) {
@@ -191,7 +167,6 @@ class VerificationScreen extends React.PureComponent {
syncApply={syncApply}
syncData={syncData}
syncHash={syncHash}
signInFlow={this.state.signInFlow}
/>
);
break;
@@ -207,7 +182,7 @@ class VerificationScreen extends React.PureComponent {
{!this.state.isEmailVerificationPhase && (
<TouchableOpacity style={firstRunStyle.closeButton} onPress={this.onCloseButtonPressed}>
<Icon name={'times'} size={16} style={firstRunStyle.closeButtonIcon} />
<Text style={firstRunStyle.closeButtonText}>x</Text>
</TouchableOpacity>
)}
</View>
-33
View File
@@ -402,39 +402,6 @@ const filePageStyle = StyleSheet.create({
marginTop: 12,
marginBottom: 12,
},
unsupportedContent: {
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 16,
padding: 24,
flexDirection: 'row',
alignItems: 'center',
backgroundColor: Colors.White,
},
unspportedContentTextContainer: {
flex: 1,
},
unsupportedContentFilename: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16,
},
unsupportedContentImage: {
width: 64,
height: 80,
marginRight: 24,
},
unsupportedContentTitle: {
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
},
unsupportedContentText: {
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 4,
},
});
export default filePageStyle;
-4
View File
@@ -153,10 +153,6 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
fontSize: 16,
},
closeButtonIcon: {
alignSelf: 'center',
color: Colors.White,
},
buttonContainer: {
flexDirection: 'row',
alignItems: 'center',
+20 -25
View File
@@ -6,37 +6,32 @@ import Constants, { DrawerRoutes, InnerDrawerRoutes } from 'constants'; // eslin
const tagNameLength = 10;
const specialRouteMap = {
about: Constants.DRAWER_ROUTE_ABOUT,
allContent: Constants.DRAWER_ROUTE_TRENDING,
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
library: Constants.DRAWER_ROUTE_MY_LBRY,
publish: Constants.DRAWER_ROUTE_PUBLISH,
publishes: Constants.DRAWER_ROUTE_PUBLISHES,
rewards: Constants.DRAWER_ROUTE_REWARDS,
settings: Constants.DRAWER_ROUTE_SETTINGS,
subscriptions: Constants.DRAWER_ROUTE_SUBSCRIPTIONS,
wallet: Constants.FULL_ROUTE_NAME_WALLET,
discover: Constants.FULL_ROUTE_NAME_DISCOVER,
};
function getRouteForSpecialUri(uri) {
let targetRoute;
const page = uri.substring(8).trim(); // 'lbry://?'.length == 8
if (specialRouteMap[page]) {
targetRoute = specialRouteMap[page];
}
if (!targetRoute) {
// default to the home page if there is no match for the page
targetRoute = Constants.FULL_ROUTE_NAME_DISCOVER;
switch (page) {
case Constants.PAGE_REWARDS:
targetRoute = Constants.DRAWER_ROUTE_REWARDS;
break;
case Constants.PAGE_SETTINGS:
targetRoute = Constants.DRAWER_ROUTE_SETTINGS;
break;
case Constants.PAGE_TRENDING:
targetRoute = Constants.DRAWER_ROUTE_TRENDING;
break;
case Constants.PAGE_WALLET:
targetRoute = Constants.FULL_ROUTE_NAME_WALLET;
break;
default:
targetRoute = Constants.FULL_ROUTE_NAME_DISCOVER;
break;
}
return targetRoute;
}
export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, fullUri) {
export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack) {
if (uri.startsWith('lbry://?')) {
dispatch(NavigationActions.navigate({ routeName: getRouteForSpecialUri(uri) }));
return;
@@ -50,7 +45,7 @@ export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, full
uriVars = parseUriVars(uriVarsStr);
}
const params = { uri, uriVars, fullUri: fullUri };
const params = { uri, uriVars };
if (!isNavigatingBack) {
dispatch(doPushDrawerStack(uri));
@@ -113,7 +108,7 @@ function parseUriVars(vars) {
return uriVars;
}
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri) {
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack) {
if (!navigation) {
return;
}
@@ -136,7 +131,7 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
}
const { store } = window;
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
const params = Object.assign({ uri, uriVars }, additionalParams);
if (navigation.state.routeName === 'File') {
const stackAction = StackActions.replace({ routeName: 'File', newKey: uri, params });
navigation.dispatch(stackAction);