From 273eedd256816599bd6b03063aaa4311941a20e6 Mon Sep 17 00:00:00 2001 From: Timo K Date: Mon, 9 Mar 2026 13:42:47 +0100 Subject: [PATCH] keep pip as it was before on mobile --- src/state/CallViewModel/CallViewModel.ts | 4 ++-- src/state/PipLayout.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/state/CallViewModel/CallViewModel.ts b/src/state/CallViewModel/CallViewModel.ts index 9a9ac11c..18e49d0a 100644 --- a/src/state/CallViewModel/CallViewModel.ts +++ b/src/state/CallViewModel/CallViewModel.ts @@ -63,7 +63,7 @@ import { playReactionsSound, showReactions, } from "../../settings/settings"; -import { isFirefox } from "../../Platform"; +import { isFirefox, platform } from "../../Platform"; import { setPipEnabled$ } from "../../controls"; import { TileStore } from "../TileStore"; import { gridLikeLayout } from "../GridLikeLayout"; @@ -1271,7 +1271,7 @@ export function createCallViewModel$( switchMap((mode) => { switch (mode) { case "pip": - return of(true); + return of(platform === "desktop" ? true : false); case "normal": case "narrow": return of(true); diff --git a/src/state/PipLayout.ts b/src/state/PipLayout.ts index 25a84e94..6ac1e4f0 100644 --- a/src/state/PipLayout.ts +++ b/src/state/PipLayout.ts @@ -5,6 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ +import { platform } from "../Platform.ts"; import { type PipLayout, type PipLayoutMedia } from "./layout-types.ts"; import { type TileStore } from "./TileStore"; @@ -16,8 +17,11 @@ export function pipLayout( prevTiles: TileStore, ): [PipLayout, TileStore] { const update = prevTiles.from(0); - // Dont maximise in pip since we want the rounded corners and the footer - update.registerSpotlight(media.spotlight, false); + // Dont maximise in pip on EW since we want the rounded corners and the footer + update.registerSpotlight( + media.spotlight, + platform === "desktop" ? false : true, + ); const tiles = update.build(); return [ {