Skip to content

Commit

Permalink
fix toggle + fix seqta toggle not responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazypersonalph committed Dec 7, 2023
1 parent d57bd4e commit 5644ad7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ dist/

# Sentry Config File
.env.sentry-build-plugin

# Sentry Config File
.env.sentry-build-plugin
3 changes: 3 additions & 0 deletions interface/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

# Sentry Config File
.env.sentry-build-plugin

# Sentry Config File
.env.sentry-build-plugin
2 changes: 1 addition & 1 deletion interface/src/SettingsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
1 change: 0 additions & 1 deletion src/SEQTA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ function GetNews(sendResponse: any) {
const DefaultValues: any = {
onoff: true,
animatedbk: true,
telemetry: false,
bksliderinput: 50,
transparencyEffects: false,
lessonalert: true,
Expand Down
16 changes: 16 additions & 0 deletions src/seqta/utils/StorageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 5644ad7

Please sign in to comment.