Skip to content

Commit

Permalink
feat: Make conversion to new settings easier
Browse files Browse the repository at this point in the history
  • Loading branch information
Tandashi committed Oct 31, 2021
1 parent bcb9c5f commit e16393f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/util/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const STORAGE_QUEUE_ID = 'syncQueue';
const STORAGE_SETTINGS_ID = 'syncSettings-v2';
const STORAGE_SETTINGS_ID = 'syncSettings';

const DEFAULT_SETTINGS: Settings = {
showReactions: true,
Expand Down Expand Up @@ -55,7 +55,10 @@ export default class Store {
* Get the stored settings
*/
public static getSettings(): Settings {
return Store.getItem(STORAGE_SETTINGS_ID) || DEFAULT_SETTINGS;
return {
...DEFAULT_SETTINGS,
...Store.getItem(STORAGE_SETTINGS_ID),
};
}

/**
Expand Down

0 comments on commit e16393f

Please sign in to comment.