From eae7d6260f6d0968a59a07576bd86937b12a673a Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Tue, 19 Sep 2023 23:26:52 +0800 Subject: [PATCH 1/2] fix: should not tight border in desktop app --- app/components/home.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/components/home.tsx b/app/components/home.tsx index 285ca0f58..07d5e88b3 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -115,7 +115,10 @@ const loadAsyncGoogleFont = () => { getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl; linkEl.rel = "stylesheet"; linkEl.href = - googleFontUrl + "/css2?family=" + encodeURIComponent("Noto Sans:wght@300;400;700;900") + "&display=swap"; + googleFontUrl + + "/css2?family=" + + encodeURIComponent("Noto Sans:wght@300;400;700;900") + + "&display=swap"; document.head.appendChild(linkEl); }; @@ -125,6 +128,8 @@ function Screen() { const isHome = location.pathname === Path.Home; const isAuth = location.pathname === Path.Auth; const isMobileScreen = useMobileScreen(); + const shouldTightBorder = + config.tightBorder && !isMobileScreen && !getClientConfig()?.isApp; useEffect(() => { loadAsyncGoogleFont(); @@ -134,11 +139,9 @@ function Screen() {
{isAuth ? ( From 26e50cefea3afe79ef98cef951ef404d077aaf3d Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 20 Sep 2023 02:09:14 +0800 Subject: [PATCH 2/2] Update chat.tsx --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 6fb497303..4e6aedecc 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -937,7 +937,7 @@ function _Chat() { const isTouchTopEdge = e.scrollTop <= edgeThreshold; const isTouchBottomEdge = bottomHeight >= e.scrollHeight - edgeThreshold; const isHitBottom = - bottomHeight >= e.scrollHeight - (isMobileScreen ? 0 : 10); + bottomHeight >= e.scrollHeight - (isMobileScreen ? 4 : 10); const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE; const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE;