auto delete theme duplicate

This commit is contained in:
SethBurkart123
2024-04-22 11:35:20 +10:00
parent 8cd73977bb
commit 3177e4bda2
6 changed files with 41 additions and 8 deletions
+3
View File
@@ -2,6 +2,7 @@
import localforage from 'localforage';
import { ThemesResponse } from '../../../interface/types/pocketbase-types';
import { CustomTheme } from '../../../interface/types/CustomThemes';
import browser from 'webextension-polyfill';
const DownloadTheme = async (theme: ThemesResponse & { theme: CustomTheme & { images: { id: string, variableName: string }[] } }) => {
const images: { imageData: Blob, imageID: string }[] = []
@@ -39,6 +40,8 @@ const DownloadTheme = async (theme: ThemesResponse & { theme: CustomTheme & { im
}
})
});
browser.runtime.sendMessage({ type: 'extensionPages', info: 'themeChanged' });
}
export default DownloadTheme;
@@ -31,6 +31,7 @@ export class MessageHandler {
await saveTheme(request.body)
await setTheme(request.body.id)
sendResponse({ status: 'success' });
browser.runtime.sendMessage({ type: 'extensionPages', info: 'themeChanged' });
}
save()
} else {