mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Instead of assuming the initial info dialog open should auto close, explicitly call opening of the dialog with a flag for auto closing. This better facilitates the auto close timeout being set at any time. The changes led to refactoring out state in the InfoDialogButton in preference for always clearing the timeout instead of first checking for interaction before clearing.
41 lines
927 B
JavaScript
41 lines
927 B
JavaScript
import { ReducerRegistry } from '../base/redux';
|
|
|
|
import {
|
|
SET_INFO_DIALOG_VISIBILITY,
|
|
UPDATE_DIAL_IN_NUMBERS_FAILED,
|
|
UPDATE_DIAL_IN_NUMBERS_SUCCESS
|
|
} from './actionTypes';
|
|
|
|
const DEFAULT_STATE = {
|
|
numbersEnabled: true
|
|
};
|
|
|
|
ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
|
|
switch (action.type) {
|
|
case SET_INFO_DIALOG_VISIBILITY:
|
|
return {
|
|
...state,
|
|
infoDialogVisible: action.visible,
|
|
infoDialogWillAutoClose: action.autoClose
|
|
};
|
|
|
|
case UPDATE_DIAL_IN_NUMBERS_FAILED:
|
|
return {
|
|
...state,
|
|
error: action.error
|
|
};
|
|
|
|
case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
|
|
const { numbers, numbersEnabled } = action.dialInNumbers;
|
|
|
|
return {
|
|
conferenceID: action.conferenceID,
|
|
numbers,
|
|
numbersEnabled
|
|
};
|
|
}
|
|
}
|
|
|
|
return state;
|
|
});
|