From 568e98a083c6d5072e51ba9e8f5b2c6c9dd12f5b Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sat, 28 Jan 2023 02:15:29 +0100 Subject: [PATCH] Calls: Fix microphone indicator not hiding after hang up (#2346) --- src/global/actions/apiUpdaters/calls.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/global/actions/apiUpdaters/calls.ts b/src/global/actions/apiUpdaters/calls.ts index 36adc3099..e1ba9abb9 100644 --- a/src/global/actions/apiUpdaters/calls.ts +++ b/src/global/actions/apiUpdaters/calls.ts @@ -77,15 +77,12 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => { if (phoneCall) { if (call.state === 'discarded') { actions.playGroupCallSound({ sound: 'end' }); - global = { + actions.hangUp({ tabId: getCurrentTabId() }); + + return { ...global, ...(call.needRating && { ratingPhoneCall: call }), - phoneCall: undefined, }; - - return updateTabState(global, { - isCallPanelVisible: undefined, - }, getCurrentTabId()); } return undefined;