From 5d06c8093c0697ebe1fbe55304d84ed2d937ae64 Mon Sep 17 00:00:00 2001 From: Athurg Gooth Date: Thu, 8 Jun 2023 22:32:57 +0800 Subject: [PATCH] fix: systemSetting in UI changed unexpectedly (#1812) Fix systemSetting in UI changed unexpectedly Co-authored-by: Athurg Feng --- web/src/components/Settings/SystemSection.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/components/Settings/SystemSection.tsx b/web/src/components/Settings/SystemSection.tsx index add1c2a5..4b6f94a2 100644 --- a/web/src/components/Settings/SystemSection.tsx +++ b/web/src/components/Settings/SystemSection.tsx @@ -74,6 +74,7 @@ const SystemSection = () => { ...state, allowSignUp: value, }); + globalStore.setSystemStatus({ allowSignUp: value }); await api.upsertSystemSetting({ name: "allow-signup", value: JSON.stringify(value), @@ -197,7 +198,7 @@ const SystemSection = () => { ...state, memoDisplayWithUpdatedTs: value, }); - globalStore.setSystemStatus({ disablePublicMemos: value }); + globalStore.setSystemStatus({ memoDisplayWithUpdatedTs: value }); await api.upsertSystemSetting({ name: "memo-display-with-updated-ts", value: JSON.stringify(value),