Commit 7e1794ce authored by Akinwale Ariwodola's avatar Akinwale Ariwodola
Browse files

fix publishes link. change minimum bid to 0.01.

parent 4c4d561f
Pipeline #1831 passed with stage
Subproject commit 4d1f142f9cf4f221a2110b7d7aa77b9f42731253
Subproject commit 5aa051332447a00c0b6586c31b34108f5c8c132d
......@@ -17,7 +17,7 @@ export default class ModalRepostView extends React.PureComponent {
state = {
channelName: null,
creditsInputFocused: false,
depositAmount: '0.1',
depositAmount: '0.01',
repostName: null,
repostStarted: false,
showAdvanced: false,
......
import { connect } from 'react-redux';
import { doSendTip, doToast, selectBalance } from 'lbry-redux';
import { selectSdkReady } from 'redux/selectors/settings';
import ModalTipView from './view';
const select = state => ({
balance: selectBalance(state),
sdkReady: selectSdkReady(state),
});
const perform = dispatch => ({
......@@ -12,7 +14,4 @@ const perform = dispatch => ({
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
});
export default connect(
select,
perform
)(ModalTipView);
export default connect(select, perform)(ModalTipView);
......@@ -18,9 +18,18 @@ export default class ModalTipView extends React.PureComponent {
};
handleSendTip = () => {
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sendTip } = this.props;
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sdkReady, sendTip } = this.props;
const { tipAmount } = this.state;
if (!sdkReady) {
notify({
message: __(
'The background service is still initializing. You can still explore and watch content during the initialization process.',
),
});
return;
}
if (tipAmount > balance) {
notify({
message: 'Insufficient credits',
......
......@@ -47,7 +47,7 @@ export default class ChannelCreator extends React.PureComponent {
channelNameUserEdited: false,
newChannelTitle: '',
newChannelName: '',
newChannelBid: 0.1,
newChannelBid: 0.01,
addingChannel: false,
creatingChannel: false,
editChannelUrl: null,
......@@ -280,7 +280,7 @@ export default class ChannelCreator extends React.PureComponent {
handleCreateCancel = () => {
const { clearChannelFormState } = this.props;
clearChannelFormState(); // explicitly clear state on cancel?
this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.1 });
this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.01 });
};
handlePickerValueChange = (itemValue, itemIndex) => {
......@@ -589,7 +589,7 @@ export default class ChannelCreator extends React.PureComponent {
channelNameUserEdited: false,
newChannelTitle: '',
newChannelName: '',
newChannelBid: 0.1,
newChannelBid: 0.01,
addingChannel: false,
creatingChannel: false,
newChannelNameError: '',
......
......@@ -820,7 +820,16 @@ class FilePage extends React.PureComponent {
};
onDownloadPressed = () => {
const { claim, title } = this.props;
const { claim, notify, sdkReady, title } = this.props;
if (!sdkReady) {
notify({
message: __(
'The background service is still initializing. You can still explore and watch content during the initialization process.',
),
});
return;
}
const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0;
Alert.alert(
__('Download file'),
......@@ -1020,7 +1029,6 @@ class FilePage extends React.PureComponent {
myClaimUris,
navigation,
position,
purchaseUri,
pushDrawerStack,
setPlayerVisible,
thumbnail,
......
......@@ -121,7 +121,7 @@ class PublishPage extends React.PureComponent {
// input data
hasEditedContentAddress: false,
bid: 0.1,
bid: 0.01,
description: null,
title: null,
language: 'en',
......
......@@ -194,7 +194,7 @@ class PublishesPage extends React.PureComponent {
});
} else {
// TODO: when shortUrl is available for my claims, navigate to that URL instead
navigateToUri(navigation, item);
navigateToUri(navigation, claim.permanent_url);
}
}
}}
......
......@@ -12,6 +12,7 @@ import {
selectViewMode,
selectFirstRunCompleted,
selectShowSuggestedSubs,
selectUser,
} from 'lbryinc';
import { doToast, selectFetchingClaimSearch } from 'lbry-redux';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
......@@ -35,6 +36,7 @@ const select = state => ({
showSuggestedSubs: selectShowSuggestedSubs(state),
timeItem: selectTimeItem(state),
sdkReady: selectSdkReady(state),
user: selectUser(state),
});
const perform = dispatch => ({
......
......@@ -38,6 +38,7 @@ class SubscriptionsPage extends React.PureComponent {
showSortPicker: false,
showTimePicker: false,
showModalSuggestedSubs: false,
userEmailVerified: false,
orderBy: ['release_time'],
filteredChannels: [],
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting subscriptions by new
......@@ -57,21 +58,14 @@ class SubscriptionsPage extends React.PureComponent {
}
onComponentFocused = () => {
const {
currentRoute,
doFetchMySubscriptions,
doFetchRecommendedSubscriptions,
doSetViewMode,
pushDrawerStack,
setPlayerVisible,
subscriptionsViewMode,
} = this.props;
const { currentRoute, doFetchMySubscriptions, pushDrawerStack, setPlayerVisible, user } = this.props;
if (currentRoute === Constants.DRAWER_ROUTE_SUBSCRIPTIONS) {
pushDrawerStack();
}
setPlayerVisible();
NativeModules.Firebase.setCurrentScreen('Subscriptions');
this.setState({ userEmailVerified: user && user.has_verified_email });
doFetchMySubscriptions();
};
......@@ -81,12 +75,19 @@ class SubscriptionsPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { currentRoute } = nextProps;
const { currentRoute: prevRoute } = this.props;
const { currentRoute, user } = nextProps;
const { currentRoute: prevRoute, doFetchMySubscriptions } = this.props;
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused();
}
if (user && user.has_verified_email && !this.state.userEmailVerified) {
// user just signed in
this.setState({ showingSuggestedSubs: false, userEmailVerified: true }, () => {
doFetchMySubscriptions();
});
}
this.unsubscribeShortChannelUrls();
}
......
......@@ -445,8 +445,8 @@ const publishStyle = StyleSheet.create({
},
publishesFooter: {
marginTop: 2,
marginLeft: 8,
marginRight: 8,
marginLeft: 16,
marginRight: 16,
},
publishesFooterButton: {
alignSelf: 'flex-start',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment