From c4d6731401d3b6dc111a74d086df28704473070d Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Sat, 17 Sep 2022 23:23:51 -0400
Subject: fix updater for new installs, fix file picker patch, fix scrolling on
 patch notes, fix tasks dir

---
 .../src/components/settings/pages/general/Updater.tsx     | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

(limited to 'frontend/src/components/settings/pages/general/Updater.tsx')

diff --git a/frontend/src/components/settings/pages/general/Updater.tsx b/frontend/src/components/settings/pages/general/Updater.tsx
index 7056ed13..ce859de7 100644
--- a/frontend/src/components/settings/pages/general/Updater.tsx
+++ b/frontend/src/components/settings/pages/general/Updater.tsx
@@ -7,19 +7,16 @@ import { FaArrowDown } from 'react-icons/fa';
 import { VerInfo, callUpdaterMethod, finishUpdate } from '../../../../updater';
 import { useDeckyState } from '../../../DeckyState';
 import InlinePatchNotes from '../../../patchnotes/InlinePatchNotes';
+import WithSuspense from '../../../WithSuspense';
 
 const MarkdownRenderer = lazy(() => import('../../../Markdown'));
 
-// import ReactMarkdown from 'react-markdown'
-// import remarkGfm from 'remark-gfm'
-
 function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | null; closeModal?: () => {} }) {
   return (
     <Focusable onCancelButton={closeModal}>
       <Carousel
         fnItemRenderer={(id: number) => (
           <Focusable
-            onActivate={() => {}}
             style={{
               marginTop: '40px',
               height: 'calc( 100% - 40px )',
@@ -32,9 +29,9 @@ function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | n
             <div>
               <h1>{versionInfo?.all?.[id]?.name}</h1>
               {versionInfo?.all?.[id]?.body ? (
-                <Suspense fallback={<Spinner style={{ width: '24', height: '24' }} />}>
-                  <MarkdownRenderer>{versionInfo.all[id].body}</MarkdownRenderer>
-                </Suspense>
+                <WithSuspense>
+                  <MarkdownRenderer onDismiss={closeModal}>{versionInfo.all[id].body}</MarkdownRenderer>
+                </WithSuspense>
               ) : (
                 'no patch notes for this version'
               )}
@@ -43,8 +40,8 @@ function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | n
         )}
         fnGetId={(id) => id}
         nNumItems={versionInfo?.all?.length}
-        nHeight={window.innerHeight - 150}
-        nItemHeight={window.innerHeight - 200}
+        nHeight={window.innerHeight - 40}
+        nItemHeight={window.innerHeight - 40}
         nItemMarginX={0}
         initialColumn={0}
         autoFocus={true}
-- 
cgit v1.2.3

