Make autoplay_next pushPrefs and set default value to autoplay setting (#7051)

This commit is contained in:
saltrafael 2021-09-09 13:53:27 -03:00 committed by GitHub
parent 737c06f33d
commit 160d8fe4b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -428,8 +428,9 @@ export function toggleVideoTheaterMode() {
export function toggleAutoplayNext() {
return (dispatch, getState) => {
const state = getState();
const ready = selectPrefsReady(state);
const autoplayNext = makeSelectClientSetting(SETTINGS.AUTOPLAY_NEXT)(state);
dispatch(doSetClientSetting(SETTINGS.AUTOPLAY_NEXT, !autoplayNext));
dispatch(doSetClientSetting(SETTINGS.AUTOPLAY_NEXT, !autoplayNext, ready));
};
}

View file

@ -70,7 +70,7 @@ const defaultState = {
// Content
[SETTINGS.SHOW_MATURE]: false,
[SETTINGS.AUTOPLAY_MEDIA]: true,
[SETTINGS.AUTOPLAY_NEXT]: true,
[SETTINGS.AUTOPLAY_NEXT]: [SETTINGS.AUTOPLAY_MEDIA],
[SETTINGS.FLOATING_PLAYER]: true,
[SETTINGS.AUTO_DOWNLOAD]: true,
[SETTINGS.HIDE_REPOSTS]: SIMPLE_SITE,