From f15b98d09acfbb63c243d03267be2e1d6c3602ce Mon Sep 17 00:00:00 2001 From: Neshura Date: Thu, 15 Dec 2022 23:41:48 +0100 Subject: [PATCH] Updated Themes and Themeselector --- components/themes.tsx | 6 +++--- components/themeselector.tsx | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/themes.tsx b/components/themes.tsx index a9cf0ab..6fd698c 100644 --- a/components/themes.tsx +++ b/components/themes.tsx @@ -29,7 +29,7 @@ export const lightTheme: DefaultTheme = { colors: { background: '#ffffff', primary: '#00aaff', - secondary:'#ffaa00', + secondary:'#ff5300', online: '#00ff00', loading: '#ff5300', offline: '#ff0000', @@ -42,7 +42,7 @@ export const darkTheme: DefaultTheme = { colors: { background: '#1f1f1f', primary: '#00aaff', - secondary:'#ffaa00', + secondary:'#ff5300', online: '#00ff00', loading: '#ff5300', offline: '#ff0000', @@ -55,7 +55,7 @@ export const amoledTheme: DefaultTheme = { colors: { background: '#000000', primary: '#00aaff', - secondary:'#ffaa00', + secondary:'#ff5300', online: '#00ff00', loading: '#ff5300', offline: '#ff0000', diff --git a/components/themeselector.tsx b/components/themeselector.tsx index cd1bbd4..e3e6ec1 100644 --- a/components/themeselector.tsx +++ b/components/themeselector.tsx @@ -16,6 +16,10 @@ export const StyleSelector = () => { const currentTheme = useContext(ThemeContext); const [selectedTheme, setSelectedTheme] = useState(themes[currentTheme.themeId]); + if(currentTheme !== selectedTheme) { + setSelectedTheme(currentTheme); + } + const updateThemeWithStorage = (newTheme: DefaultTheme) => { if (newTheme.themeId === lightTheme.themeId) {