From b9703104b5b416dd3211adedb878d1916072c96d Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sat, 13 Feb 2021 16:35:39 +0800
Subject: ...

---
 .../app/views/timeline-common/TimelinePropertyChangeDialog.tsx   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx')

diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
index b99ec267..a5628a9a 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePropertyChangeDialog.tsx
@@ -10,12 +10,11 @@ import {
 
 import OperationDialog from "../common/OperationDialog";
 
-// TODO: Trigger resync.
-
 export interface TimelinePropertyChangeDialogProps {
   open: boolean;
   close: () => void;
   timeline: HttpTimelineInfo;
+  onChange: () => void;
 }
 
 const labelMap: { [key in TimelineVisibility]: string } = {
@@ -27,7 +26,7 @@ const labelMap: { [key in TimelineVisibility]: string } = {
 const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps> = (
   props
 ) => {
-  const { timeline } = props;
+  const { timeline, onChange } = props;
 
   return (
     <OperationDialog
@@ -66,7 +65,9 @@ const TimelinePropertyChangeDialog: React.FC<TimelinePropertyChangeDialogProps>
         if (newDescription !== timeline.description) {
           req.description = newDescription;
         }
-        return getHttpTimelineClient().patchTimeline(timeline.name, req);
+        return getHttpTimelineClient()
+          .patchTimeline(timeline.name, req)
+          .then(onChange);
       }}
     />
   );
-- 
cgit v1.2.3

