Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -35,7 +35,7 @@ const STORAGE_LIMIT = 100;
|
|||
|
||||
// TODO remove this after some time
|
||||
function migrate() {
|
||||
const data: ILegacyFormat = JSON.parse(window.localStorage.mx_reaction_count || '{}');
|
||||
const data: ILegacyFormat = JSON.parse(window.localStorage.mx_reaction_count || "{}");
|
||||
const sorted = Object.entries(data).sort(([, [count1, date1]], [, [count2, date2]]) => date2 - date1);
|
||||
const newFormat = sorted.map(([emoji, [count, date]]) => [emoji, count]);
|
||||
SettingsStore.setValue(SETTING_NAME, null, SettingLevel.ACCOUNT, newFormat.slice(0, STORAGE_LIMIT));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue