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

fixes #2873
This commit is contained in:
Aakansha Doshi 2021-01-29 02:21:10 +05:30 committed by GitHub
parent ed0bec41dc
commit 6e9df2bae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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