mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 09:18:51 +01:00
Add __STATES_STATS__ for debugging
This commit is contained in:
parent
087e282677
commit
a1021e1aee
1 changed files with 14 additions and 0 deletions
14
src/app.jsx
14
src/app.jsx
|
@ -55,6 +55,20 @@ import { getCurrentAccount } from './utils/store-utils';
|
||||||
import './utils/toast-alert';
|
import './utils/toast-alert';
|
||||||
|
|
||||||
window.__STATES__ = states;
|
window.__STATES__ = states;
|
||||||
|
window.__STATES_STATS__ = () => {
|
||||||
|
const keys = [
|
||||||
|
'statuses',
|
||||||
|
'accounts',
|
||||||
|
'spoilers',
|
||||||
|
'unfurledLinks',
|
||||||
|
'statusQuotes',
|
||||||
|
];
|
||||||
|
const counts = {};
|
||||||
|
keys.forEach((key) => {
|
||||||
|
counts[key] = Object.keys(states[key]).length;
|
||||||
|
});
|
||||||
|
console.warn('STATE stats', counts);
|
||||||
|
};
|
||||||
|
|
||||||
// Preload icons
|
// Preload icons
|
||||||
// There's probably a better way to do this
|
// There's probably a better way to do this
|
||||||
|
|
Loading…
Reference in a new issue