Playlist fall out fixes #7032

Merged
saltrafael merged 4 commits from list-fall-out into master 2021-09-10 19:27:21 +02:00
2 changed files with 15 additions and 9 deletions
Showing only changes of commit b2196be4ff - Show all commits
ui/redux/actions

View file

@ -290,10 +290,10 @@ export function doToggleLoopList(collectionId: string, loop: boolean, hideToast:
type: ACTIONS.TOGGLE_LOOP_LIST,
data: { collectionId, loop },
});
if (loop && !hideToast) {
if (!hideToast) {
dispatch(
doToast({
message: __('Loop is on.'),
message: loop ? __('Loop is on.') : __('Loop is off.'),
})
);
}
@ -323,18 +323,18 @@ export function doToggleShuffleList(currentUri: string, collectionId: string, sh
type: ACTIONS.TOGGLE_SHUFFLE_LIST,
data: { collectionId, newUrls },
});
if (!hideToast) {
dispatch(
doToast({
message: __('Shuffle is on.'),
})
);
}
} else {
dispatch({
type: ACTIONS.TOGGLE_SHUFFLE_LIST,
data: { collectionId, newUrls: false },
});
}
if (!hideToast) {
dispatch(
doToast({
message: shuffle ? __('Shuffle is on.') : __('Shuffle is off.'),
})
);
}
};
}

View file

@ -432,5 +432,11 @@ export function toggleAutoplayNext() {
const autoplayNext = makeSelectClientSetting(SETTINGS.AUTOPLAY_NEXT)(state);
dispatch(doSetClientSetting(SETTINGS.AUTOPLAY_NEXT, !autoplayNext, ready));
dispatch(
doToast({
message: autoplayNext ? __('Autoplay Next is off.') : __('Autoplay Next is on.'),
})
);
};
}