1
0
Fork 0

Add __STATES_STATS__ for debugging

This commit is contained in:
Lim Chee Aun 2023-10-28 11:07:35 +08:00
parent 087e282677
commit a1021e1aee

View file

@ -55,6 +55,20 @@ import { getCurrentAccount } from './utils/store-utils';
import './utils/toast-alert';
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
// There's probably a better way to do this