Explorar o código

fix(app.tsx): show correct state of Nerd stats in context menu when nerd stats dialog closed (#2874)

fixes #2873
Aakansha Doshi %!s(int64=4) %!d(string=hai) anos
pai
achega
6e9df2bae7
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/components/App.tsx

+ 1 - 3
src/components/App.tsx

@@ -1160,9 +1160,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
     if (!this.state.showStats) {
       trackEvent("dialog", "stats");
     }
-    this.setState({
-      showStats: !this.state.showStats,
-    });
+    this.actionManager.executeAction(actionToggleStats);
   };
 
   setScrollToCenter = (remoteElements: readonly ExcalidrawElement[]) => {