add setCurrentScreen calls
This commit is contained in:
parent
d8f361b982
commit
4648312528
18 changed files with 43 additions and 7 deletions
|
@ -43,6 +43,7 @@ class AboutPage extends React.PureComponent {
|
||||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('About');
|
||||||
|
|
||||||
if (NativeModules.VersionInfo) {
|
if (NativeModules.VersionInfo) {
|
||||||
NativeModules.VersionInfo.getAppVersion().then(version => {
|
NativeModules.VersionInfo.getAppVersion().then(version => {
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ActivityIndicator, Dimensions, Image, ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
import {
|
||||||
|
ActivityIndicator,
|
||||||
|
Dimensions,
|
||||||
|
Image,
|
||||||
|
NativeModules,
|
||||||
|
ScrollView,
|
||||||
|
Text,
|
||||||
|
TouchableOpacity,
|
||||||
|
View,
|
||||||
|
} from 'react-native';
|
||||||
import { TabView, SceneMap } from 'react-native-tab-view';
|
import { TabView, SceneMap } from 'react-native-tab-view';
|
||||||
import { normalizeURI } from 'lbry-redux';
|
import { normalizeURI } from 'lbry-redux';
|
||||||
import { navigateBack, getOrderBy } from 'utils/helper';
|
import { navigateBack, getOrderBy } from 'utils/helper';
|
||||||
|
@ -36,6 +45,10 @@ class ChannelPage extends React.PureComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Channel');
|
||||||
|
}
|
||||||
|
|
||||||
handleSortByItemSelected = item => {
|
handleSortByItemSelected = item => {
|
||||||
const { setSortByItem } = this.props;
|
const { setSortByItem } = this.props;
|
||||||
setSortByItem(item);
|
setSortByItem(item);
|
||||||
|
|
|
@ -38,6 +38,8 @@ class DiscoverPage extends React.PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Your tags');
|
||||||
|
|
||||||
// Track the total time taken if this is the first launch
|
// Track the total time taken if this is the first launch
|
||||||
AsyncStorage.getItem('firstLaunchTime').then(startTime => {
|
AsyncStorage.getItem('firstLaunchTime').then(startTime => {
|
||||||
if (startTime !== null && !isNaN(parseInt(startTime, 10))) {
|
if (startTime !== null && !isNaN(parseInt(startTime, 10))) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Lbry, buildURI, normalizeURI } from 'lbry-redux';
|
import { Lbry, buildURI, normalizeURI } from 'lbry-redux';
|
||||||
import { ActivityIndicator, Button, FlatList, Text, TextInput, View, ScrollView } from 'react-native';
|
import { ActivityIndicator, Button, FlatList, NativeModules, Text, TextInput, View, ScrollView } from 'react-native';
|
||||||
import { navigateToUri, uriFromFileInfo } from 'utils/helper';
|
import { navigateToUri, uriFromFileInfo } from 'utils/helper';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
@ -34,6 +34,8 @@ class DownloadsPage extends React.PureComponent {
|
||||||
const { fetchMyClaims, fileList, pushDrawerStack, setPlayerVisible } = this.props;
|
const { fetchMyClaims, fileList, pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Library');
|
||||||
|
|
||||||
fetchMyClaims();
|
fetchMyClaims();
|
||||||
fileList();
|
fileList();
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,6 +93,7 @@ class FilePage extends React.PureComponent {
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
StatusBar.setHidden(false);
|
StatusBar.setHidden(false);
|
||||||
|
NativeModules.Firebase.setCurrentScreen('File');
|
||||||
|
|
||||||
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
||||||
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
|
|
|
@ -45,6 +45,8 @@ class FirstRunScreen extends React.PureComponent {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (NativeModules.FirstRun) {
|
if (NativeModules.FirstRun) {
|
||||||
|
NativeModules.Firebase.setCurrentScreen('First Run');
|
||||||
|
|
||||||
NativeModules.FirstRun.isFirstRun().then(firstRun => {
|
NativeModules.FirstRun.isFirstRun().then(firstRun => {
|
||||||
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
|
AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL);
|
||||||
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
|
AsyncStorage.removeItem(Constants.KEY_EMAIL_VERIFY_PENDING);
|
||||||
|
|
|
@ -152,9 +152,9 @@ class PublishPage extends React.PureComponent {
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
|
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Publish');
|
||||||
|
|
||||||
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
|
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
|
||||||
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
|
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ActivityIndicator, FlatList, Text, TouchableOpacity, View } from 'react-native';
|
import { ActivityIndicator, FlatList, NativeModules, Text, TouchableOpacity, View } from 'react-native';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
@ -29,9 +29,10 @@ class PublishesPage extends React.PureComponent {
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { checkPendingPublishes, fetchMyClaims, pushDrawerStack, setPlayerVisible } = this.props;
|
const { checkPendingPublishes, fetchMyClaims, pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
|
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Publishes');
|
||||||
|
|
||||||
fetchMyClaims();
|
fetchMyClaims();
|
||||||
checkPendingPublishes();
|
checkPendingPublishes();
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,8 @@ class RewardsPage extends React.PureComponent {
|
||||||
|
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Rewards');
|
||||||
|
|
||||||
fetchRewards();
|
fetchRewards();
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Lbry, parseURI, normalizeURI, isURIValid } from 'lbry-redux';
|
import { Lbry, parseURI, normalizeURI, isURIValid } from 'lbry-redux';
|
||||||
import { ActivityIndicator, Button, Text, TextInput, View, ScrollView } from 'react-native';
|
import { ActivityIndicator, Button, NativeModules, Text, TextInput, View, ScrollView } from 'react-native';
|
||||||
import { navigateToUri } from 'utils/helper';
|
import { navigateToUri } from 'utils/helper';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
@ -37,6 +37,7 @@ class SearchPage extends React.PureComponent {
|
||||||
const { pushDrawerStack, setPlayerVisible, query, search } = this.props;
|
const { pushDrawerStack, setPlayerVisible, query, search } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Search');
|
||||||
|
|
||||||
const searchQuery = query || this.getSearchQuery();
|
const searchQuery = query || this.getSearchQuery();
|
||||||
if (searchQuery && searchQuery.trim().length > 0) {
|
if (searchQuery && searchQuery.trim().length > 0) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ class SettingsPage extends React.PureComponent {
|
||||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Settings');
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
|
@ -239,6 +239,8 @@ class SplashScreen extends React.PureComponent {
|
||||||
NativeModules.Firebase.track('app_launch', null);
|
NativeModules.Firebase.track('app_launch', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Splash');
|
||||||
|
|
||||||
this.props.fetchRewardedContent();
|
this.props.fetchRewardedContent();
|
||||||
Linking.getInitialURL().then(url => {
|
Linking.getInitialURL().then(url => {
|
||||||
if (url) {
|
if (url) {
|
||||||
|
|
|
@ -64,6 +64,8 @@ class SubscriptionsPage extends React.PureComponent {
|
||||||
|
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Subscriptions');
|
||||||
|
|
||||||
doFetchMySubscriptions();
|
doFetchMySubscriptions();
|
||||||
doFetchRecommendedSubscriptions();
|
doFetchRecommendedSubscriptions();
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,6 +43,7 @@ class TagPage extends React.PureComponent {
|
||||||
this.setState({ tag, orderBy: getOrderBy(sortByItem) });
|
this.setState({ tag, orderBy: getOrderBy(sortByItem) });
|
||||||
pushDrawerStack(Constants.DRAWER_ROUTE_TAG, navigation.state.params);
|
pushDrawerStack(Constants.DRAWER_ROUTE_TAG, navigation.state.params);
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Tag');
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, ScrollView, Text } from 'react-native';
|
import { NativeModules, View, ScrollView, Text } from 'react-native';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import TransactionList from 'component/transactionList';
|
import TransactionList from 'component/transactionList';
|
||||||
import UriBar from 'component/uriBar';
|
import UriBar from 'component/uriBar';
|
||||||
|
@ -23,6 +23,8 @@ class TransactionHistoryPage extends React.PureComponent {
|
||||||
const { fetchTransactions, pushDrawerStack, setPlayerVisible } = this.props;
|
const { fetchTransactions, pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Transaction History');
|
||||||
|
|
||||||
fetchTransactions();
|
fetchTransactions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ class TrendingPage extends React.PureComponent {
|
||||||
this.setState({ currentTrendingForItem: TRENDING_FOR_ITEMS[filterForTags ? 1 : 0] });
|
this.setState({ currentTrendingForItem: TRENDING_FOR_ITEMS[filterForTags ? 1 : 0] });
|
||||||
pushDrawerStack(Constants.DRAWER_ROUTE_TRENDING, navigation.state.params);
|
pushDrawerStack(Constants.DRAWER_ROUTE_TRENDING, navigation.state.params);
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('All content');
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
|
@ -29,6 +29,7 @@ class VerificationScreen extends React.PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { user } = this.props;
|
const { user } = this.props;
|
||||||
this.checkVerificationStatus(user);
|
this.checkVerificationStatus(user);
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Verification');
|
||||||
}
|
}
|
||||||
|
|
||||||
setEmailVerificationPhase = value => {
|
setEmailVerificationPhase = value => {
|
||||||
|
|
|
@ -42,6 +42,7 @@ class WalletPage extends React.PureComponent {
|
||||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Wallet');
|
||||||
|
|
||||||
const { deviceWalletSynced, getSync, user } = this.props;
|
const { deviceWalletSynced, getSync, user } = this.props;
|
||||||
if (deviceWalletSynced && user && user.has_verified_email) {
|
if (deviceWalletSynced && user && user.has_verified_email) {
|
||||||
|
|
Loading…
Reference in a new issue