From 3698238e9e056709384f2b4fd72b4f24486da290 Mon Sep 17 00:00:00 2001 From: fullex <0xfullex@gmail.com> Date: Sat, 29 Mar 2025 10:47:18 +0800 Subject: [PATCH] fix: one-off minapp should not show minimize button --- .../components/MinApp/MinappPopupContainer.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/MinApp/MinappPopupContainer.tsx b/src/renderer/src/components/MinApp/MinappPopupContainer.tsx index a554cb8b..6b668795 100644 --- a/src/renderer/src/components/MinApp/MinappPopupContainer.tsx +++ b/src/renderer/src/components/MinApp/MinappPopupContainer.tsx @@ -99,6 +99,9 @@ const MinappPopupContainer: React.FC = () => { }) }, [currentMinappId]) + /** only the keepalive minapp can be minimized */ + const canMinimize = !(openedOneOffMinapp && openedOneOffMinapp.id == currentMinappId) + /** combine the openedKeepAliveMinapps and openedOneOffMinapp */ const combinedApps = useMemo(() => { return [...openedKeepAliveMinapps, ...(openedOneOffMinapp ? [openedOneOffMinapp] : [])] @@ -237,11 +240,13 @@ const MinappPopupContainer: React.FC = () => { )} - - - + {canMinimize && ( + + + + )}