lbrytv to not block CHANNEL_SUBSCRIBE due to lack of daemonsettings share
This commit is contained in:
parent
c4630ac7ae
commit
115148cea6
2 changed files with 13 additions and 6 deletions
|
@ -21,7 +21,8 @@ export const doSetViewMode = (viewMode: ViewMode) => (dispatch: Dispatch) =>
|
|||
export const doFetchMySubscriptions = () => (dispatch: Dispatch, getState: GetState) => {
|
||||
const state: { subscriptions: SubscriptionState, settings: any } = getState();
|
||||
const { subscriptions: reduxSubscriptions } = state.subscriptions;
|
||||
const { share_usage_data: isSharingData } = state.settings.daemonSettings;
|
||||
const { share_usage_data: shareSetting } = state.settings.daemonSettings;
|
||||
const isSharingData = shareSetting || IS_WEB;
|
||||
|
||||
if (!isSharingData && isSharingData !== undefined) {
|
||||
// They aren't sharing their data, subscriptions will be handled by persisted redux state
|
||||
|
@ -293,7 +294,8 @@ export const doChannelSubscribe = (subscription: Subscription) => (dispatch: Dis
|
|||
const {
|
||||
settings: { daemonSettings },
|
||||
} = getState();
|
||||
const { share_usage_data: isSharingData } = daemonSettings;
|
||||
const { share_usage_data: shareSetting } = daemonSettings;
|
||||
const isSharingData = shareSetting || IS_WEB;
|
||||
|
||||
const subscriptionUri = subscription.uri;
|
||||
if (!subscriptionUri.startsWith('lbry://')) {
|
||||
|
@ -306,7 +308,7 @@ export const doChannelSubscribe = (subscription: Subscription) => (dispatch: Dis
|
|||
});
|
||||
|
||||
// if the user isn't sharing data, keep the subscriptions entirely in the app
|
||||
if (isSharingData) {
|
||||
if (isSharingData || IS_WEB) {
|
||||
const { channelClaimId } = parseURI(subscription.uri);
|
||||
// They are sharing data, we can store their subscriptions in our internal database
|
||||
Lbryio.call('subscription', 'new', {
|
||||
|
@ -324,7 +326,8 @@ export const doChannelUnsubscribe = (subscription: Subscription) => (dispatch: D
|
|||
const {
|
||||
settings: { daemonSettings },
|
||||
} = getState();
|
||||
const { share_usage_data: isSharingData } = daemonSettings;
|
||||
const { share_usage_data: shareSetting } = daemonSettings;
|
||||
const isSharingData = shareSetting || IS_WEB;
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.CHANNEL_UNSUBSCRIBE,
|
||||
|
|
|
@ -799,5 +799,9 @@
|
|||
"Type \"%acknowledgement_text%\"": "Type \"%acknowledgement_text%\"",
|
||||
"You must enter \"%acknowledgement_text%\"": "You must enter \"%acknowledgement_text%\"",
|
||||
"Decrypt Wallet": "Decrypt Wallet",
|
||||
"Your wallet has been encrypted with a local password, performing this action will remove this password.": "Your wallet has been encrypted with a local password, performing this action will remove this password."
|
||||
}
|
||||
"Your wallet has been encrypted with a local password, performing this action will remove this password.": "Your wallet has been encrypted with a local password, performing this action will remove this password.",
|
||||
"Enter a LBRY URL or search for videos, music, games and more": "Enter a LBRY URL or search for videos, music, games and more",
|
||||
"This app will automatically download new free content from channels you are subscribed to. You may configure this in Settings or on the Subscriptions page.": "This app will automatically download new free content from channels you are subscribed to. You may configure this in Settings or on the Subscriptions page.",
|
||||
"(Only available on the desktop app.)": "(Only available on the desktop app.)",
|
||||
"If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page.": "If we have your email address, we will send you notifications related to new content. You may configure these emails from the Help page."
|
||||
}
|
Loading…
Reference in a new issue