From 6d1690a8046c222d936f9e54c1f255314cf29b6b Mon Sep 17 00:00:00 2001 From: CodeurIII <113228775+codeuriii@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:40:18 +0400 Subject: [PATCH] Update src/views/settings/SettingsSubjects.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 𝕂𝕪𝕝𝕚𝕒𝕟 <164187100+Kgeek33@users.noreply.github.com> --- src/views/settings/SettingsSubjects.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/settings/SettingsSubjects.tsx b/src/views/settings/SettingsSubjects.tsx index 425d516a..c869b971 100644 --- a/src/views/settings/SettingsSubjects.tsx +++ b/src/views/settings/SettingsSubjects.tsx @@ -400,7 +400,12 @@ const SettingsSubjects: Screen<"SettingsSubjects"> = ({ navigation }) => { onPress={() => { if (/^#[0-9A-F]{6}$/i.test(customColor)) { handleSubjectColorChange(selectedSubject[0], customColor); - setCustomColor(""); + setSelectedSubject((prev) => { + if (prev) { + prev[1].color = customColor; + } + return prev; + }); } }} >