New group call experience: Room header call buttons (#9311)

* Make useEventEmitterState more efficient

By not invoking the initializing function on every render

* Make useWidgets more efficient

By not calling WidgetStore on every render

* Add new group call experience Labs flag

* Add viewingCall field to RoomViewStore state

Currently has no effect, but in the future this will signal to RoomView to show the call or call lobby.

* Add element_call.use_exclusively config flag

As documented in element-web, this will tell the app to use Element Call exclusively for calls, disabling Jitsi and legacy 1:1 calls.

* Make placeCall return a promise

So that the UI can know when placeCall completes

* Update start call buttons to new group call designs

Since RoomView doesn't do anything with viewingCall yet, these buttons won't have any effect when starting native group calls, but the logic is at least all there and ready to be hooked up.

* Allow calls to be detected if the new group call experience is enabled

* Test the RoomHeader changes

* Iterate code
This commit is contained in:
Robin 2022-09-25 10:57:25 -04:00 committed by GitHub
parent 12e3ba8e5a
commit d077ea1990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1005 additions and 123 deletions

View file

@ -47,6 +47,7 @@ export interface ViewRoomPayload extends Pick<ActionPayload, "action"> {
forceTimeline?: boolean; // Whether to override default behaviour to end up at a timeline
show_room_tile?: boolean; // Whether to ensure that the room tile is visible in the room list
clear_search?: boolean; // Whether to clear the room list search
view_call?: boolean; // Whether to view the call or call lobby for the room
deferred_action?: ActionPayload; // Action to fire after MatrixChat handles this ViewRoom action