"Fossies" - the Fresh Open Source Software Archive 
Member "jitsi-meet-7312/react/features/base/user-interaction/reducer.ts" (1 Jun 2023, 694 Bytes) of package /linux/misc/jitsi-meet-7312.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app/actionTypes';
2 import ReducerRegistry from '../redux/ReducerRegistry';
3
4 import { USER_INTERACTION_RECEIVED } from './actionTypes';
5
6 export interface IUserInteractionState {
7 interacted?: boolean;
8 }
9
10
11 ReducerRegistry.register<IUserInteractionState>('features/base/user-interaction',
12 (state = {}, action): IUserInteractionState => {
13 switch (action.type) {
14 case APP_WILL_MOUNT:
15 case APP_WILL_UNMOUNT:
16 return {
17 ...state,
18 interacted: false
19 };
20
21 case USER_INTERACTION_RECEIVED:
22 return {
23 ...state,
24 interacted: true
25 };
26 }
27
28 return state;
29 });