Apply prettier formatting
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user