graceguo-supercat commented on a change in pull request #9886:
URL: 
https://github.com/apache/incubator-superset/pull/9886#discussion_r434188694



##########
File path: superset-frontend/src/dashboard/components/Header.jsx
##########
@@ -249,14 +272,21 @@ class Header extends React.PureComponent {
       colorNamespace,
       colorScheme,
       dashboardInfo,
-      refreshFrequency,
+      refreshFrequency: currentRefreshFrequency,
+      isPersistentRefreshFrequency,
     } = this.props;
 
     const scale = CategoricalColorNamespace.getScale(
       colorScheme,
       colorNamespace,
     );
     const labelColors = colorScheme ? scale.getColorMap() : {};
+    // check refresh frequency is for current session or persist
+    const refreshFrequency = getPersistentRefreshFrequency({
+      currentRefreshFrequency,
+      isPersistent: isPersistentRefreshFrequency,
+      dashboardInfo,
+    });

Review comment:
       this logic used in 2 files, save button and save modal. I feel isolate 
out this small piece is better than copy and paste.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to