stories: muted by default, muted on app blur

This commit is contained in:
Jamie Kyle
2022-11-09 20:24:42 -08:00
committed by GitHub
parent cd1a1a00a2
commit 9f85db3fd8
12 changed files with 88 additions and 60 deletions

View File

@@ -91,7 +91,6 @@ export const actions = {
removeItem,
removeItemExternal,
resetItems,
toggleHasAllStoriesMuted,
};
export const useActions = (): typeof actions => useBoundActions(actions);
@@ -112,19 +111,6 @@ function onSetSkinTone(tone: number): ItemPutAction {
return putItem('skinTone', tone);
}
function toggleHasAllStoriesMuted(): ThunkAction<
void,
RootStateType,
unknown,
ItemPutAction
> {
return (dispatch, getState) => {
const hasAllStoriesMuted = Boolean(getState().items.hasAllStoriesMuted);
dispatch(putItem('hasAllStoriesMuted', !hasAllStoriesMuted));
};
}
function putItemExternal(key: string, value: unknown): ItemPutExternalAction {
return {
type: 'items/PUT_EXTERNAL',