From 59abae2a042401b42848a66773d71927ca7c341c Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Thu, 6 Jun 2024 16:09:33 +0200 Subject: [PATCH] fix a bug where the "sign commits" toggle did not work --- app/src/lib/components/PreferencesForm.svelte | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/lib/components/PreferencesForm.svelte b/app/src/lib/components/PreferencesForm.svelte index c2258b374..6071d1748 100644 --- a/app/src/lib/components/PreferencesForm.svelte +++ b/app/src/lib/components/PreferencesForm.svelte @@ -43,9 +43,9 @@ } let signCommits = false; - async function setSignCommits(value: boolean) { - signCommits = value; - await gitConfig.setGbConfig(project.id, { signCommits: value }); + async function setSignCommits() { + signCommits = !signCommits; + await gitConfig.setGbConfig(project.id, { signCommits: signCommits }); } // gpg.format @@ -128,11 +128,7 @@ GitButler will sign commits as per your git configuration. - await setSignCommits(signCommits)} - /> + {#if signCommits}