Adds playback bar to story viewer
This commit is contained in:
parent
9817946afc
commit
85c8ff76dc
17 changed files with 291 additions and 125 deletions
|
@ -91,6 +91,7 @@ export const actions = {
|
|||
removeItem,
|
||||
removeItemExternal,
|
||||
resetItems,
|
||||
toggleHasAllStoriesMuted,
|
||||
};
|
||||
|
||||
export const useActions = (): typeof actions => useBoundActions(actions);
|
||||
|
@ -111,6 +112,19 @@ 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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue