remove old syncSettings usage

This commit is contained in:
Sean Yesmunt 2020-09-15 09:54:05 -04:00
parent db43769cbb
commit ac770518bf
6 changed files with 10 additions and 18 deletions

View file

@ -2,8 +2,7 @@ import { connect } from 'react-redux';
import { selectFetchingClaimSearch, SETTINGS, selectFollowedTags } from 'lbry-redux';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import { doSetClientSetting, doSyncClientSettings } from 'redux/actions/settings';
import { doSetClientSetting } from 'redux/actions/settings';
import ClaimListDiscover from './view';
const select = state => ({
@ -15,7 +14,6 @@ const select = state => ({
const perform = {
doToggleTagFollowDesktop,
doSetClientSetting,
doSyncClientSettings,
};
export default connect(select, perform)(ClaimListDiscover);

View file

@ -29,9 +29,8 @@ type Props = {
hiddenNsfwMessage?: Node,
channelIds?: Array<string>,
tileLayout: boolean,
doSetClientSetting: (string, boolean) => void,
doSetClientSetting: (string, boolean, ?boolean) => void,
setPage: number => void,
doSyncClientSettings: () => void,
};
function ClaimListHeader(props: Props) {
@ -53,7 +52,6 @@ function ClaimListHeader(props: Props) {
channelIds,
tileLayout,
doSetClientSetting,
doSyncClientSettings,
setPage,
} = props;
const { action, push, location } = useHistory();
@ -241,8 +239,7 @@ function ClaimListHeader(props: Props) {
{tileLayout !== undefined && (
<Button
onClick={() => {
doSetClientSetting(SETTINGS.TILE_LAYOUT, !tileLayout);
doSyncClientSettings();
doSetClientSetting(SETTINGS.TILE_LAYOUT, !tileLayout, true);
}}
button="alt"
className="button-toggle"

View file

@ -122,7 +122,7 @@ export default function Notification(props: Props) {
<div className="notification__extra">
<div className="notification__time">
<DateTime timeAgo date={notification.created_at} />
<DateTime timeAgo date={notification.active_at} />
</div>
{!is_seen && <Button className="notification__mark-seen" onClick={handleSeeNotification} />}
</div>

View file

@ -2,7 +2,7 @@ import REWARD_TYPES from 'rewards';
import { connect } from 'react-redux';
import { selectGetSyncIsPending, selectSyncHash } from 'lbryinc';
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 { doUserFetch } from 'redux/actions/user';
import {
@ -61,8 +61,7 @@ const perform = dispatch => ({
notifyError: false,
})
),
syncSettings: () => dispatch(doSyncClientSettings()),
setClientSetting: (setting, value) => dispatch(doSetClientSetting(setting, value)),
setClientSetting: (setting, value, pushToPrefs) => dispatch(doSetClientSetting(setting, value, pushToPrefs)),
doToggleInterestedInYoutubeSync: () => dispatch(doToggleInterestedInYoutubeSync()),
});

View file

@ -39,8 +39,7 @@ type Props = {
hasSynced: boolean,
syncingWallet: boolean,
creatingChannel: boolean,
syncSettings: () => void,
setClientSetting: (string, boolean) => void,
setClientSetting: (string, boolean, ?boolean) => void,
followingAcknowledged: boolean,
tagsAcknowledged: boolean,
rewardsAcknowledged: boolean,
@ -68,7 +67,6 @@ function UserSignUp(props: Props) {
followingAcknowledged,
tagsAcknowledged,
rewardsAcknowledged,
syncSettings,
setClientSetting,
interestedInYoutubeSync,
doToggleInterestedInYoutubeSync,
@ -128,8 +126,7 @@ function UserSignUp(props: Props) {
canHijackSignInFlowWithSpinner && (isCurrentlyFetchingSomething || isWaitingForSomethingToFinish);
function setSettingAndSync(setting, value) {
setClientSetting(setting, value);
syncSettings();
setClientSetting(setting, value, true);
}
React.useEffect(() => {

View file

@ -53,7 +53,7 @@ type Props = {
findingFFmpeg: boolean,
findFFmpeg: () => void,
language?: string,
syncSettings: () => void,
syncEnabled: boolean,
enterSettings: () => void,
exitSettings: () => void,
};
@ -412,6 +412,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
placeholder={__('A Folder containing FFmpeg')}
currentPath={ffmpegPath || daemonSettings.ffmpeg_path}
onFileChosen={(newDirectory: WebFile) => {
// $FlowFixMe
this.onFFmpegFolder(newDirectory.path);
}}
disabled={Boolean(ffmpegPath)}