move show footer logic to callViewModel

Also remove header prop. This is accesible via urlParams.
This commit is contained in:
Timo K
2026-04-10 17:01:56 +02:00
parent 6be06de153
commit f75e91fc2b
9 changed files with 58 additions and 17 deletions

View File

@@ -14,11 +14,13 @@ import {
type RTCNotificationType,
} from "matrix-js-sdk/lib/matrixrtc";
import { pickBy } from "lodash-es";
import { BehaviorSubject } from "rxjs";
import { Config } from "./config/Config";
import { type EncryptionSystem } from "./e2ee/sharedKeyManagement";
import { E2eeType } from "./e2ee/e2eeType";
import { platform } from "./Platform";
import { type ObservableScope } from "./state/ObservableScope";
interface RoomIdentifier {
roomAlias: string | null;
@@ -607,6 +609,24 @@ export const useRoomIdentifier = (): RoomIdentifier => {
);
};
let urlParams$ = undefined as BehaviorSubject<UrlParams> | undefined;
export const observerUrlParams$ = (
scope: ObservableScope,
): BehaviorSubject<UrlParams> => {
if (urlParams$ !== undefined) return urlParams$;
function updateUrlParams(): void {
console.log("[observerUrlParams$] update urlParams$");
urlParams$!.next(getUrlParams());
}
urlParams$ = new BehaviorSubject(getUrlParams());
window.addEventListener("hashchange", updateUrlParams);
scope.onEnd(() => {
window.removeEventListener("hashchange", updateUrlParams);
});
return urlParams$;
};
export function generateUrlSearchParams(
roomId: string,
encryptionSystem: EncryptionSystem,