In prerelease, enable background throttling when not on a call

This commit is contained in:
Evan Hahn 2021-09-28 14:00:22 -05:00 committed by GitHub
parent 2f7226e200
commit 942ce16610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 2 deletions

View file

@ -86,6 +86,7 @@ export type PropsType = {
openSystemPreferencesAction: () => unknown;
playRingtone: () => unknown;
setGroupCallVideoRequest: (_: SetGroupCallVideoRequestType) => void;
setIsCallActive: (_: boolean) => void;
setLocalAudio: (_: SetLocalAudioType) => void;
setLocalVideo: (_: SetLocalVideoType) => void;
setLocalPreview: (_: SetLocalPreviewType) => void;
@ -366,9 +367,15 @@ export const CallManager: React.FC<PropsType> = props => {
notifyForCall,
playRingtone,
stopRingtone,
setIsCallActive,
setOutgoingRing,
} = props;
const isCallActive = Boolean(activeCall);
useEffect(() => {
setIsCallActive(isCallActive);
}, [isCallActive, setIsCallActive]);
const shouldRing = getShouldRing(props);
useEffect(() => {
if (shouldRing) {