Compare commits
4 Commits
feat/code-
...
v0.43.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3542402a7c | ||
|
|
afb86e6694 | ||
|
|
6965404d7b | ||
|
|
eef0c455c0 |
@@ -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"
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user