New Header edgecase fixes: Close lobby button not shown, disable join button in various places, more... (#12235)
* Add missing tooltip Signed-off-by: Timo K <toger5@hotmail.de> * fix incoming call toast (icon + disabled button if there is an ongoing call) Signed-off-by: Timo K <toger5@hotmail.de> * room header - fix join button not getting disabled if there is an ongoing call - fix close lobby button not shown (instead we see the join button) Signed-off-by: Timo K <toger5@hotmail.de> * additional tests Signed-off-by: Timo K <toger5@hotmail.de> * fix tests Signed-off-by: Timo K <toger5@hotmail.de> * update snapshot Signed-off-by: Timo K <toger5@hotmail.de> * fix not open menu if disabled Signed-off-by: Timo K <toger5@hotmail.de> * add tooltip provider Signed-off-by: Timo K <toger5@hotmail.de> * update snap class Signed-off-by: Timo K <toger5@hotmail.de> * room header snap update Signed-off-by: Timo K <toger5@hotmail.de> * fix snapshot Signed-off-by: Timo K <toger5@hotmail.de> --------- Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
parent
1c789cbb18
commit
552c65db98
5 changed files with 132 additions and 53 deletions
|
@ -61,6 +61,7 @@ const enum State {
|
|||
NoPermission,
|
||||
Unpinned,
|
||||
Ongoing,
|
||||
NotJoined,
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,7 +177,7 @@ export const useRoomCall = (
|
|||
if (activeCalls.find((call) => call.roomId != room.roomId)) {
|
||||
return State.Ongoing;
|
||||
}
|
||||
if (hasGroupCall || hasJitsiWidget || hasManagedHybridWidget) {
|
||||
if (hasGroupCall && (hasJitsiWidget || hasManagedHybridWidget)) {
|
||||
return promptPinWidget ? State.Unpinned : State.Ongoing;
|
||||
}
|
||||
if (hasLegacyCall) {
|
||||
|
@ -243,6 +244,7 @@ export const useRoomCall = (
|
|||
videoCallDisabledReason = _t("voip|disabled_no_one_here");
|
||||
break;
|
||||
case State.Unpinned:
|
||||
case State.NotJoined:
|
||||
case State.NoCall:
|
||||
voiceCallDisabledReason = null;
|
||||
videoCallDisabledReason = null;
|
||||
|
|
|
@ -74,14 +74,14 @@ export const useParticipatingMembers = (call: Call): RoomMember[] => {
|
|||
}, [participants]);
|
||||
};
|
||||
|
||||
export const useFull = (call: Call): boolean => {
|
||||
export const useFull = (call: Call | null): boolean => {
|
||||
return (
|
||||
useParticipantCount(call) >=
|
||||
(SdkConfig.get("element_call").participant_limit ?? DEFAULTS.element_call.participant_limit!)
|
||||
);
|
||||
};
|
||||
|
||||
export const useJoinCallButtonDisabledTooltip = (call: Call): string | null => {
|
||||
export const useJoinCallButtonDisabledTooltip = (call: Call | null): string | null => {
|
||||
const isFull = useFull(call);
|
||||
const state = useConnectionState(call);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue