remove old syncSettings usage
This commit is contained in:
parent
db43769cbb
commit
ac770518bf
6 changed files with 10 additions and 18 deletions
|
@ -2,8 +2,7 @@ import { connect } from 'react-redux';
|
||||||
import { selectFetchingClaimSearch, SETTINGS, selectFollowedTags } from 'lbry-redux';
|
import { selectFetchingClaimSearch, SETTINGS, selectFollowedTags } from 'lbry-redux';
|
||||||
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
||||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import { doSetClientSetting, doSyncClientSettings } from 'redux/actions/settings';
|
import { doSetClientSetting } from 'redux/actions/settings';
|
||||||
|
|
||||||
import ClaimListDiscover from './view';
|
import ClaimListDiscover from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
|
@ -15,7 +14,6 @@ const select = state => ({
|
||||||
const perform = {
|
const perform = {
|
||||||
doToggleTagFollowDesktop,
|
doToggleTagFollowDesktop,
|
||||||
doSetClientSetting,
|
doSetClientSetting,
|
||||||
doSyncClientSettings,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(select, perform)(ClaimListDiscover);
|
export default connect(select, perform)(ClaimListDiscover);
|
||||||
|
|
|
@ -29,9 +29,8 @@ type Props = {
|
||||||
hiddenNsfwMessage?: Node,
|
hiddenNsfwMessage?: Node,
|
||||||
channelIds?: Array<string>,
|
channelIds?: Array<string>,
|
||||||
tileLayout: boolean,
|
tileLayout: boolean,
|
||||||
doSetClientSetting: (string, boolean) => void,
|
doSetClientSetting: (string, boolean, ?boolean) => void,
|
||||||
setPage: number => void,
|
setPage: number => void,
|
||||||
doSyncClientSettings: () => void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function ClaimListHeader(props: Props) {
|
function ClaimListHeader(props: Props) {
|
||||||
|
@ -53,7 +52,6 @@ function ClaimListHeader(props: Props) {
|
||||||
channelIds,
|
channelIds,
|
||||||
tileLayout,
|
tileLayout,
|
||||||
doSetClientSetting,
|
doSetClientSetting,
|
||||||
doSyncClientSettings,
|
|
||||||
setPage,
|
setPage,
|
||||||
} = props;
|
} = props;
|
||||||
const { action, push, location } = useHistory();
|
const { action, push, location } = useHistory();
|
||||||
|
@ -241,8 +239,7 @@ function ClaimListHeader(props: Props) {
|
||||||
{tileLayout !== undefined && (
|
{tileLayout !== undefined && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
doSetClientSetting(SETTINGS.TILE_LAYOUT, !tileLayout);
|
doSetClientSetting(SETTINGS.TILE_LAYOUT, !tileLayout, true);
|
||||||
doSyncClientSettings();
|
|
||||||
}}
|
}}
|
||||||
button="alt"
|
button="alt"
|
||||||
className="button-toggle"
|
className="button-toggle"
|
||||||
|
|
|
@ -122,7 +122,7 @@ export default function Notification(props: Props) {
|
||||||
|
|
||||||
<div className="notification__extra">
|
<div className="notification__extra">
|
||||||
<div className="notification__time">
|
<div className="notification__time">
|
||||||
<DateTime timeAgo date={notification.created_at} />
|
<DateTime timeAgo date={notification.active_at} />
|
||||||
</div>
|
</div>
|
||||||
{!is_seen && <Button className="notification__mark-seen" onClick={handleSeeNotification} />}
|
{!is_seen && <Button className="notification__mark-seen" onClick={handleSeeNotification} />}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import REWARD_TYPES from 'rewards';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectGetSyncIsPending, selectSyncHash } from 'lbryinc';
|
import { selectGetSyncIsPending, selectSyncHash } from 'lbryinc';
|
||||||
import { doClaimRewardType } from 'redux/actions/rewards';
|
import { doClaimRewardType } from 'redux/actions/rewards';
|
||||||
import { doSyncClientSettings, doSetClientSetting } from 'redux/actions/settings';
|
import { doSetClientSetting } from 'redux/actions/settings';
|
||||||
import { selectClaimedRewards, makeSelectIsRewardClaimPending } from 'redux/selectors/rewards';
|
import { selectClaimedRewards, makeSelectIsRewardClaimPending } from 'redux/selectors/rewards';
|
||||||
import { doUserFetch } from 'redux/actions/user';
|
import { doUserFetch } from 'redux/actions/user';
|
||||||
import {
|
import {
|
||||||
|
@ -61,8 +61,7 @@ const perform = dispatch => ({
|
||||||
notifyError: false,
|
notifyError: false,
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
syncSettings: () => dispatch(doSyncClientSettings()),
|
setClientSetting: (setting, value, pushToPrefs) => dispatch(doSetClientSetting(setting, value, pushToPrefs)),
|
||||||
setClientSetting: (setting, value) => dispatch(doSetClientSetting(setting, value)),
|
|
||||||
doToggleInterestedInYoutubeSync: () => dispatch(doToggleInterestedInYoutubeSync()),
|
doToggleInterestedInYoutubeSync: () => dispatch(doToggleInterestedInYoutubeSync()),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,7 @@ type Props = {
|
||||||
hasSynced: boolean,
|
hasSynced: boolean,
|
||||||
syncingWallet: boolean,
|
syncingWallet: boolean,
|
||||||
creatingChannel: boolean,
|
creatingChannel: boolean,
|
||||||
syncSettings: () => void,
|
setClientSetting: (string, boolean, ?boolean) => void,
|
||||||
setClientSetting: (string, boolean) => void,
|
|
||||||
followingAcknowledged: boolean,
|
followingAcknowledged: boolean,
|
||||||
tagsAcknowledged: boolean,
|
tagsAcknowledged: boolean,
|
||||||
rewardsAcknowledged: boolean,
|
rewardsAcknowledged: boolean,
|
||||||
|
@ -68,7 +67,6 @@ function UserSignUp(props: Props) {
|
||||||
followingAcknowledged,
|
followingAcknowledged,
|
||||||
tagsAcknowledged,
|
tagsAcknowledged,
|
||||||
rewardsAcknowledged,
|
rewardsAcknowledged,
|
||||||
syncSettings,
|
|
||||||
setClientSetting,
|
setClientSetting,
|
||||||
interestedInYoutubeSync,
|
interestedInYoutubeSync,
|
||||||
doToggleInterestedInYoutubeSync,
|
doToggleInterestedInYoutubeSync,
|
||||||
|
@ -128,8 +126,7 @@ function UserSignUp(props: Props) {
|
||||||
canHijackSignInFlowWithSpinner && (isCurrentlyFetchingSomething || isWaitingForSomethingToFinish);
|
canHijackSignInFlowWithSpinner && (isCurrentlyFetchingSomething || isWaitingForSomethingToFinish);
|
||||||
|
|
||||||
function setSettingAndSync(setting, value) {
|
function setSettingAndSync(setting, value) {
|
||||||
setClientSetting(setting, value);
|
setClientSetting(setting, value, true);
|
||||||
syncSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|
|
@ -53,7 +53,7 @@ type Props = {
|
||||||
findingFFmpeg: boolean,
|
findingFFmpeg: boolean,
|
||||||
findFFmpeg: () => void,
|
findFFmpeg: () => void,
|
||||||
language?: string,
|
language?: string,
|
||||||
syncSettings: () => void,
|
syncEnabled: boolean,
|
||||||
enterSettings: () => void,
|
enterSettings: () => void,
|
||||||
exitSettings: () => void,
|
exitSettings: () => void,
|
||||||
};
|
};
|
||||||
|
@ -412,6 +412,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
placeholder={__('A Folder containing FFmpeg')}
|
placeholder={__('A Folder containing FFmpeg')}
|
||||||
currentPath={ffmpegPath || daemonSettings.ffmpeg_path}
|
currentPath={ffmpegPath || daemonSettings.ffmpeg_path}
|
||||||
onFileChosen={(newDirectory: WebFile) => {
|
onFileChosen={(newDirectory: WebFile) => {
|
||||||
|
// $FlowFixMe
|
||||||
this.onFFmpegFolder(newDirectory.path);
|
this.onFFmpegFolder(newDirectory.path);
|
||||||
}}
|
}}
|
||||||
disabled={Boolean(ffmpegPath)}
|
disabled={Boolean(ffmpegPath)}
|
||||||
|
|
Loading…
Add table
Reference in a new issue