mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-05 19:48:05 +00:00
Ongoing call tiles - Implement the view-models and store (#34198)
* Add a common view snapshot type This will contain the common snapshot values used by both dm ongoing call tile view and room ongoing call tile view. * Implement the common join button component * Implement the call icon component * Implement the common container component * Support single digit minutes in existing clock component * Implement the view for duration component * Add static profile pics to be used in storybook tests * Implement view for member avatar component * Implement view for face pile component * Implement RoomOngoingCallTileView * Implement DmOngoingCallTileView * Support the new tiles in RootTileView * Export all the views * Update all the screenshots * Implement view model for duration view * Implement vm for face pile view * Implement vm for member avatar view * Expose call store via the sdk context * Add method to get all calls in store * Add store to track latest notification event per room * Also expose new store via sdk context * Create a base vm for both tiles * Implement the room ongoing call tile vm * Implement the dm ongoing call tile vm * Support new tile vms in the root tile vm * Rename getCallInRoom -> getCallOrThrow * Change confusing comment in test * Check existing events first and use decryption promise * Clarify recompute vs update in code comment * Use vi.mocked instead of ts-ignore * Change type of size to number * Import only the type * Pass size as number instead of string * Check if call is jistsi call in root tile * Add more tests * Rename isCallIgnored -> isCallDeclined * Add a comment about the 10px margin * Add comments to explain css heights and widths
This commit is contained in:
@@ -30,6 +30,8 @@ import { Action } from "../dispatcher/actions.ts";
|
||||
import { type OnLoggedInPayload } from "../dispatcher/payloads/OnLoggedInPayload.ts";
|
||||
import Notifier from "../Notifier.ts";
|
||||
import SettingController from "../settings/controllers/SettingController.ts";
|
||||
import { CallStore } from "../stores/CallStore";
|
||||
import { LatestRtcNotificationEventStore } from "../stores/LatestRtcNotificationEventStore";
|
||||
|
||||
/**
|
||||
* A class which (mostly) lazily initialises stores as and when they are requested, ensuring they remain
|
||||
@@ -72,6 +74,8 @@ export class SDKContextClass {
|
||||
protected _ResizeNotifier?: ResizeNotifier;
|
||||
protected _MultiRoomViewStore?: MultiRoomViewStore;
|
||||
protected _Notifier?: Notifier;
|
||||
protected _CallStore?: CallStore;
|
||||
protected _LatestRtcNotificationEventStore?: LatestRtcNotificationEventStore;
|
||||
|
||||
public constructor() {
|
||||
SettingController.sdkContext = this;
|
||||
@@ -203,6 +207,19 @@ export class SDKContextClass {
|
||||
return this._Notifier;
|
||||
}
|
||||
|
||||
public get callStore(): CallStore {
|
||||
this._CallStore ??= CallStore.instance;
|
||||
return this._CallStore;
|
||||
}
|
||||
|
||||
public get latestRtcNotificationEventStore(): LatestRtcNotificationEventStore {
|
||||
if (!this._LatestRtcNotificationEventStore) {
|
||||
this._LatestRtcNotificationEventStore = new LatestRtcNotificationEventStore(this.callStore);
|
||||
this._LatestRtcNotificationEventStore.start();
|
||||
}
|
||||
return this._LatestRtcNotificationEventStore;
|
||||
}
|
||||
|
||||
public onLoggedOut(): void {
|
||||
this._UserProfilesStore = undefined;
|
||||
this._client = undefined;
|
||||
|
||||
Reference in New Issue
Block a user