mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat: debounce creator + general improvements
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import localforage from 'localforage';
|
||||
import type { CustomTheme, LoadedCustomTheme } from '@/types/CustomThemes';
|
||||
import { settingsState } from '@/seqta/utils/listeners/SettingsState';
|
||||
import debounce from '@/seqta/utils/debounce';
|
||||
|
||||
type ThemeContent = {
|
||||
id: string;
|
||||
@@ -517,6 +518,14 @@ export class ThemeManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the preview of a theme (debounced)
|
||||
* @param theme - The theme to update the preview of
|
||||
*/
|
||||
public updatePreviewDebounced = debounce((theme: Partial<LoadedCustomTheme>): void => {
|
||||
this.updatePreview(theme);
|
||||
}, 2);
|
||||
|
||||
/**
|
||||
* Clear theme preview
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user