Properly style call buttons across app, when already in a call
This commit is contained in:
parent
3c25092f50
commit
c251867699
39 changed files with 610 additions and 189 deletions
|
@ -56,7 +56,7 @@ const useOutgoingCallButtonStyle = (
|
|||
const callSelector = useSelector(getCallSelector);
|
||||
strictAssert(ourAci, 'useOutgoingCallButtonStyle missing our uuid');
|
||||
|
||||
if (activeCall != null) {
|
||||
if (activeCall?.conversationId === conversation.id) {
|
||||
return OutgoingCallButtonStyle.None;
|
||||
}
|
||||
|
||||
|
@ -100,6 +100,8 @@ export const SmartConversationHeader = memo(function SmartConversationHeader({
|
|||
const hasPanelShowing = useSelector(getHasPanelOpen);
|
||||
const outgoingCallButtonStyle = useOutgoingCallButtonStyle(conversation);
|
||||
const theme = useSelector(getTheme);
|
||||
const activeCall = useSelector(getActiveCallState);
|
||||
const hasActiveCall = Boolean(activeCall);
|
||||
|
||||
const {
|
||||
destroyMessages,
|
||||
|
@ -264,6 +266,7 @@ export const SmartConversationHeader = memo(function SmartConversationHeader({
|
|||
cannotLeaveBecauseYouAreLastAdmin={cannotLeaveBecauseYouAreLastAdmin}
|
||||
conversation={minimalConversation}
|
||||
conversationName={conversationName}
|
||||
hasActiveCall={hasActiveCall}
|
||||
hasPanelShowing={hasPanelShowing}
|
||||
hasStories={hasStories}
|
||||
i18n={i18n}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue