From 58b5192d5a75ce327f9ec53c61ebd3019da6fe89 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 25 Feb 2021 15:20:35 +0100 Subject: [PATCH] Fix toggling settings. Explanation: https://github.com/preactjs/preact/issues/3044 --- source/manifest.json | 2 +- source/settings/components/index.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/source/manifest.json b/source/manifest.json index b471616..7df09de 100644 --- a/source/manifest.json +++ b/source/manifest.json @@ -3,7 +3,7 @@ "manifest_version": 2, "name": "Tildes ReExtended", "description": "An updated and reimagined recreation of Tildes Extended to enhance and improve the experience of Tildes.net.", - "version": "1.0.2", + "version": "1.0.3", "permissions": [ "downloads", "storage", diff --git a/source/settings/components/index.ts b/source/settings/components/index.ts index ef8f0e1..e43d31e 100644 --- a/source/settings/components/index.ts +++ b/source/settings/components/index.ts @@ -10,19 +10,15 @@ export type SettingProps = { title: string; }; -function toggleFeature(feature: string) { - const {toggleFeature: toggle} = useContext(AppContext); - toggle(feature); -} - function Header(props: SettingProps): TRXComponent { + const context = useContext(AppContext); const enabled = props.enabled ? 'Enabled' : 'Disabled'; return html`

${props.title}