make downloading themes possible from background script

This commit is contained in:
SethBurkart123
2024-04-11 08:42:33 +10:00
parent 8c06ea1ec1
commit 4a29885e62
5 changed files with 48 additions and 3 deletions
+5
View File
@@ -2,6 +2,7 @@ import * as Sentry from "@sentry/browser";
import browser from 'webextension-polyfill'
import { onError } from './seqta/utils/onError';
import { SettingsState } from "./types/storage";
import DownloadTheme from "./seqta/ui/themes/downloadTheme";
browser.storage.local.get([ "telemetry" ]).then((telemetry) => {
if (telemetry.telemetry === true) {
@@ -140,6 +141,10 @@ browser.runtime.onMessage.addListener((request: any, _sender: any, sendResponse:
GetNews(sendResponse, url);
return true;
case 'DownloadTheme':
DownloadTheme(request.body.theme);
break;
default:
console.log('Unknown request type');