From 0fd5c2026e266a8bf5f120cdd21b4cd5a5bae755 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Wed, 10 Jun 2020 00:24:16 +0800
Subject: Rename.

---
 Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx')

diff --git a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
index cd9393c2..8fc3815b 100644
--- a/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
+++ b/Timeline/ClientApp/src/timeline/TimelinePageTemplateUI.tsx
@@ -68,17 +68,17 @@ export default function TimelinePageTemplateUI<
     }
   }, []);
 
-  const onLoadSubject = React.useMemo(() => new Subject(), []);
-  const triggerLoadEvent = React.useCallback(() => {
-    onLoadSubject.next(null);
-  }, [onLoadSubject]);
+  const resizeSubject = React.useMemo(() => new Subject(), []);
+  const triggerResizeEvent = React.useCallback(() => {
+    resizeSubject.next(null);
+  }, [resizeSubject]);
 
   React.useEffect(() => {
     let jumpToBottom = true;
     const timerTag = window.setTimeout(() => {
       jumpToBottom = false;
     }, 1000);
-    const subscription = onLoadSubject.subscribe(() => {
+    const subscription = resizeSubject.subscribe(() => {
       if (jumpToBottom)
         window.scrollTo(0, document.body.getBoundingClientRect().height);
     });
@@ -86,7 +86,7 @@ export default function TimelinePageTemplateUI<
       clearTimeout(timerTag);
       subscription.unsubscribe();
     };
-  }, [onLoadSubject, timeline, props.posts]);
+  }, [resizeSubject, timeline, props.posts]);
 
   const [cardHeight, setCardHeight] = React.useState<number>(0);
 
@@ -128,7 +128,7 @@ export default function TimelinePageTemplateUI<
             <Timeline
               posts={props.posts}
               onDelete={props.onDelete}
-              onLoad={triggerLoadEvent}
+              onResize={triggerResizeEvent}
             />
           );
           if (props.onPost != null) {
-- 
cgit v1.2.3

