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:
Timo
2024-02-08 17:48:50 +01:00
committed by GitHub
parent 1c789cbb18
commit 552c65db98
5 changed files with 132 additions and 53 deletions
+2 -2
View File
@@ -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);