From 5a5654d4f5971cb4130eddb229d9b84222452fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Mon, 10 Apr 2023 22:15:47 +0200 Subject: [PATCH] fix missing disbled feature not working with pressable --- front/components/GtkUI/Element.tsx | 2 +- front/views/settings/SettingsProfileView.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/front/components/GtkUI/Element.tsx b/front/components/GtkUI/Element.tsx index 3201e68..ab60f74 100644 --- a/front/components/GtkUI/Element.tsx +++ b/front/components/GtkUI/Element.tsx @@ -17,7 +17,7 @@ export const Element = (props: ElementProps) => { break; } - if (actionFunction) { + if (!props?.disabled && actionFunction) { return ( {({ isHovered }) => { diff --git a/front/views/settings/SettingsProfileView.tsx b/front/views/settings/SettingsProfileView.tsx index 7a4ec6b..d49a1e1 100644 --- a/front/views/settings/SettingsProfileView.tsx +++ b/front/views/settings/SettingsProfileView.tsx @@ -133,6 +133,7 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => { { type: "toggle", title: "Notifications", + disabled: true, data: { value: toggle, onToggle: () => {