diff options
author | crupest <crupest@outlook.com> | 2022-04-24 15:22:05 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-24 15:22:05 +0800 |
commit | 3bc8ee1de171f0bd8e226542d75c842c5b2e7175 (patch) | |
tree | 408cea3b767dc5768ad3c08d6e547c876ce1175e /FrontEnd/src/views | |
parent | d8adfa6b141c8e3a8f11592b831c574dee8602b9 (diff) | |
download | timeline-3bc8ee1de171f0bd8e226542d75c842c5b2e7175.tar.gz timeline-3bc8ee1de171f0bd8e226542d75c842c5b2e7175.tar.bz2 timeline-3bc8ee1de171f0bd8e226542d75c842c5b2e7175.zip |
...
Diffstat (limited to 'FrontEnd/src/views')
-rw-r--r-- | FrontEnd/src/views/timeline/Timeline.tsx | 7 | ||||
-rw-r--r-- | FrontEnd/src/views/timeline/index.tsx | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/FrontEnd/src/views/timeline/Timeline.tsx b/FrontEnd/src/views/timeline/Timeline.tsx index 7fb58e0c..e8b1147f 100644 --- a/FrontEnd/src/views/timeline/Timeline.tsx +++ b/FrontEnd/src/views/timeline/Timeline.tsx @@ -62,7 +62,10 @@ const Timeline: React.FC<TimelineProps> = (props) => { React.useEffect(() => { if (timelineName != null && state === "loaded") { - const timelinePostUpdate$ = getTimelinePostUpdate$(timelineName); + const timelinePostUpdate$ = getTimelinePostUpdate$( + timelineOwner, + timelineName + ); const subscription = timelinePostUpdate$.subscribe( ({ update, state }) => { if (update) { @@ -75,7 +78,7 @@ const Timeline: React.FC<TimelineProps> = (props) => { subscription.unsubscribe(); }; } - }, [timelineName, state, onReload, onConnectionStateChanged]); + }, [timelineOwner, timelineName, state, onReload, onConnectionStateChanged]); React.useEffect(() => { if (timelineName != null) { diff --git a/FrontEnd/src/views/timeline/index.tsx b/FrontEnd/src/views/timeline/index.tsx index 3bd3ae3c..65bb90f6 100644 --- a/FrontEnd/src/views/timeline/index.tsx +++ b/FrontEnd/src/views/timeline/index.tsx @@ -4,7 +4,6 @@ import { useParams } from "react-router-dom"; import { UiLogicError } from "@/common"; import { HttpTimelineInfo } from "@/http/timeline"; -import useReverseScrollPositionRemember from "@/utilities/useReverseScrollPositionRemember"; import { generatePalette, setPalette } from "@/palette"; import Timeline from "./Timeline"; @@ -29,8 +28,6 @@ const TimelinePage: React.FC = () => { const [connectionStatus, setConnectionStatus] = React.useState<HubConnectionState>(HubConnectionState.Connecting); - useReverseScrollPositionRemember(); - React.useEffect(() => { if (timeline != null && timeline.color != null) { return setPalette(generatePalette({ primary: timeline.color })); |