Skip to content

Commit

Permalink
Feat improve timers (#318)
Browse files Browse the repository at this point in the history
* feat: Update SettingsManager to save faster

* feat: Update ItemStore to save to db faster
  • Loading branch information
Qt-dev authored Jul 23, 2024
1 parent cc85717 commit 5ef2114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/SettingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class SettingsManager {

this.saveScheduler = setTimeout(() => {
this.save();
}, 2000);
}, 300);
}

async save() {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/stores/itemStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const logger = Logger.scope('renderer/item-store');

// Mobx store for Items
export default class ItemStore {
IgnoredStatusUpdateFrequency = 1000; // ms to wait before updating the ignore status
IgnoredStatusUpdateFrequency = 300; // ms to wait before updating the ignore status
itemsWaitingUpdate: {id: string, status: boolean}[] = [];
ignoredStatusUpdateTimeout: NodeJS.Timeout | null = null;
items: Item[] = [];
Expand Down

0 comments on commit 5ef2114

Please sign in to comment.