2021-01-28 00:41:17 +05:30
|
|
|
import { register } from "./register";
|
|
|
|
|
|
|
|
export const actionToggleStats = register({
|
|
|
|
name: "stats",
|
|
|
|
perform(elements, appState) {
|
|
|
|
return {
|
|
|
|
appState: {
|
|
|
|
...appState,
|
2021-01-29 23:38:37 +05:30
|
|
|
showStats: !this.checked!(appState),
|
2021-01-28 00:41:17 +05:30
|
|
|
},
|
|
|
|
commitToHistory: false,
|
|
|
|
};
|
|
|
|
},
|
2021-01-29 23:38:37 +05:30
|
|
|
checked: (appState) => appState.showStats,
|
2021-01-28 00:41:17 +05:30
|
|
|
contextItemLabel: "stats.title",
|
|
|
|
});
|