Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix color for header in list

ammarahm-ed95b6ded321a9
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index 855b4567b..871ccf783 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -91,7 +91,12 @@ const SimpleList = ({
justifyContent: 'space-between',
paddingHorizontal: 12,
height: 35,
- backgroundColor: index === 1 ? colors.shade : colors.nav,
+ backgroundColor:
+ index === 1
+ ? headerProps.color
+ ? colors[headerProps.color]
+ : colors.shade
+ : colors.nav,
marginTop: index === 1 ? 0 : 5,
}}>
<TouchableWithoutFeedback
diff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/views/Notes/index.js
index 6471e7c85..837735357 100644
--- a/apps/mobile/src/views/Notes/index.js
+++ b/apps/mobile/src/views/Notes/index.js
@@ -196,6 +196,7 @@ export const Notes = ({route, navigation}) => {
params.type === 'tag'
? '#' + params.title
: params.title.slice(0, 1).toUpperCase() + params.title.slice(1),
+ color: params.type === 'color' ? params.title.toLowerCase() : null,
}}
loading={loading}
focused={() => navigation.isFocused()}