virtuacoplenny ada57ebcd0
ref(user-interaction): do not store listener, move browser check to lib (#4441)
* ref(user-interaction): remove storing of listener

* ref(user-interaction): move browser requirement check to lib-jitsi-meet

* ref(user-interaction): no inner function for listener, use module scope
2019-07-13 06:59:58 -07:00

26 lines
563 B
JavaScript

// @flow
import { ReducerRegistry } from '../redux';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
import { USER_INTERACTION_RECEIVED } from './actionTypes';
ReducerRegistry.register('features/base/user-interaction', (state = {}, action) => {
switch (action.type) {
case APP_WILL_MOUNT:
case APP_WILL_UNMOUNT:
return {
...state,
interacted: false
};
case USER_INTERACTION_RECEIVED:
return {
...state,
interacted: true
};
}
return state;
});