snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
39
react/features/base/net-info/actions.ts
Normal file
39
react/features/base/net-info/actions.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { SET_NETWORK_INFO, _STORE_NETWORK_INFO_CLEANUP } from './actionTypes';
|
||||
import { NetworkInfo } from './types';
|
||||
|
||||
/**
|
||||
* Up[dates the network info state.
|
||||
*
|
||||
* @param {NetworkInfo} networkInfo - The new network state to be set.
|
||||
* @returns {{
|
||||
* type: SET_NETWORK_INFO,
|
||||
* isOnline: boolean,
|
||||
* networkType: string,
|
||||
* details: Object
|
||||
* }}
|
||||
*/
|
||||
export function setNetworkInfo({ isOnline, networkType, details }: NetworkInfo) {
|
||||
return {
|
||||
type: SET_NETWORK_INFO,
|
||||
isOnline,
|
||||
networkType,
|
||||
details
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Stored the cleanup function used to shutdown the {@code NetworkInfoService}.
|
||||
*
|
||||
* @param {Function} cleanup - The cleanup function to be called on {@code APP_WILL_UNMOUNT}.
|
||||
* @returns {{
|
||||
* type: _STORE_NETWORK_INFO_CLEANUP,
|
||||
* cleanup: Function
|
||||
* }}
|
||||
* @private
|
||||
*/
|
||||
export function _storeNetworkInfoCleanup(cleanup?: Function) {
|
||||
return {
|
||||
type: _STORE_NETWORK_INFO_CLEANUP,
|
||||
cleanup
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user