fix toggle + fix seqta toggle not responsive

This commit is contained in:
Crazypersonalph
2023-12-07 13:14:41 +08:00
parent 03ab5f0cdc
commit 292659828e
6 changed files with 24 additions and 2 deletions
+3
View File
@@ -14,3 +14,6 @@ dist/
# Sentry Config File
.env.sentry-build-plugin
# Sentry Config File
.env.sentry-build-plugin
+3
View File
@@ -4,3 +4,6 @@
# Sentry Config File
.env.sentry-build-plugin
# Sentry Config File
.env.sentry-build-plugin
+1 -1
View File
@@ -16,7 +16,7 @@ export const SettingsContextProvider: React.FC<{ children: ReactNode }> = ({ chi
const [settingsState, setSettingsState] = useState<SettingsState>({
notificationCollector: false,
lessonAlerts: false,
telemetry: true,
telemetry: false,
animatedBackground: false,
animatedBackgroundSpeed: "0",
customThemeColor: "rgba(219, 105, 105, 1)",
-1
View File
@@ -371,7 +371,6 @@ export function RemoveBackground() {
bk[0].remove();
bk2[0].remove();
bk3[0].remove();
console.log('it deleted???')
}
export function waitForElm(selector: any) {
+1
View File
@@ -152,6 +152,7 @@ function GetNews(sendResponse: any) {
const DefaultValues: any = {
onoff: true,
animatedbk: true,
telemetry: false,
bksliderinput: 50,
transparencyEffects: false,
lessonalert: true,
+16
View File
@@ -28,6 +28,14 @@ export default class StorageListener {
this.handleSelectedColorChange(changes.selectedColor.newValue);
break;
case 'telemetry':
this.handleTelemetryChange();
break;
case 'onoff':
this.handleOnOffChange();
break;
case 'shortcuts':
this.handleShortcutsChange(
changes.shortcuts.oldValue,
@@ -90,6 +98,14 @@ export default class StorageListener {
}
}
handleTelemetryChange() {
browser.runtime.sendMessage({ type: 'reloadTabs' })
}
handleOnOffChange() {
browser.runtime.sendMessage({ type: 'reloadTabs' })
}
handleNotificationCollectorChange(details: any) {
if (details.newValue) {
enableNotificationCollector();