Compare commits

...
4 Commits
Author SHA1 Message Date
Sean Yesmunt 3542402a7c v0.43.2 2020-02-25 21:37:56 -05:00
Sean Yesmunt afb86e6694 v0.43.2-rc.2 2020-02-25 21:13:53 -05:00
Sean Yesmunt 6965404d7b enable share_usage_data setting for signed in users if it isn't checked 2020-02-25 21:11:47 -05:00
Sean Yesmunt eef0c455c0 comment out broken preference sync code 2020-02-25 21:05:22 -05:00
4 changed files with 32 additions and 27 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lbry",
"version": "0.43.2-rc.1",
"version": "0.43.2",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"keywords": [
"lbry"
+2 -1
View File
@@ -987,5 +987,6 @@
"FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone.",
"Allow the app to access third party analytics platforms": "Allow the app to access third party analytics platforms",
"Share usage data with LBRY inc.": "Share usage data with LBRY inc.",
"Required": "Required"
"Required": "Required",
"Email %help_link% or join our %chat_link% if you encounter any trouble verifying.": "Email %help_link% or join our %chat_link% if you encounter any trouble verifying."
}
+1 -1
View File
@@ -471,7 +471,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
? __('Internal sharing is required while signed in.')
: __('Internal sharing is required to participate in rewards programs.')
}
disabled={isAuthenticated}
disabled={isAuthenticated && daemonSettings.share_usage_data}
/>
<FormField
type="checkbox"
+28 -24
View File
@@ -19,10 +19,14 @@ import {
doPreferenceGet,
doToast,
doClearSupport,
SHARED_PREFERENCES,
// SHARED_PREFERENCES,
} from 'lbry-redux';
import Native from 'native';
import { doFetchDaemonSettings, doSetAutoLaunch, doSetDaemonSetting } from 'redux/actions/settings';
import {
doFetchDaemonSettings,
doSetAutoLaunch,
// doSetDaemonSetting
} from 'redux/actions/settings';
import {
selectIsUpgradeSkipped,
selectUpdateUrl,
@@ -35,7 +39,7 @@ import {
selectModal,
selectAllowAnalytics,
} from 'redux/selectors/app';
import { selectDaemonSettings } from 'redux/selectors/settings';
// import { selectDaemonSettings } from 'redux/selectors/settings';
import { doAuthenticate, doGetSync } from 'lbryinc';
import { lbrySettings as config, version as appVersion } from 'package.json';
import analytics, { SHARE_INTERNAL } from 'analytics';
@@ -482,31 +486,31 @@ export function doToggle3PAnalytics(allowParam, doNotDispatch) {
export function doGetAndPopulatePreferences() {
return (dispatch, getState) => {
function successCb(savedPreferences) {
const state = getState();
const daemonSettings = selectDaemonSettings(state);
// const state = getState();
// const daemonSettings = selectDaemonSettings(state);
if (savedPreferences !== null) {
dispatch(doPopulateSharedUserState(savedPreferences));
// @if TARGET='app'
const { settings, sharing_3P: sharing3P } = savedPreferences.value;
// apply daemonSettings (todo: separate function)
Object.entries(settings).forEach(([key, val]) => {
if (val !== null && daemonSettings[key] !== val) {
if (key === SHARED_PREFERENCES.WALLET_SERVERS) {
const hasSavedServers = Array.isArray(val) && val.length > 0;
if (hasSavedServers) {
// Ignore this key if there are no actual saved servers in the list
const servers = val.map(item => `${item[0]}:${item[1]}`);
dispatch(doSetDaemonSetting(key, servers, true));
}
} else {
dispatch(doSetDaemonSetting(key, val, true));
}
}
});
if (sharing3P !== undefined) {
doToggle3PAnalytics(sharing3P, true);
}
// const { settings, sharing_3P: sharing3P } = savedPreferences.value;
// // apply daemonSettings (todo: separate function)
// Object.entries(settings).forEach(([key, val]) => {
// if (val !== null && daemonSettings[key] !== val) {
// if (key === SHARED_PREFERENCES.WALLET_SERVERS) {
// const hasSavedServers = Array.isArray(val) && val.length > 0;
// if (hasSavedServers) {
// // Ignore this key if there are no actual saved servers in the list
// const servers = val.map(item => `${item[0]}:${item[1]}`);
// dispatch(doSetDaemonSetting(key, servers, true));
// }
// } else {
// dispatch(doSetDaemonSetting(key, val, true));
// }
// }
// });
// if (sharing3P !== undefined) {
// doToggle3PAnalytics(sharing3P, true);
// }
// @endif
}
}