Skip to content

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

update notes-core

ammarahm-ed7e29f214edcf
diff --git a/apps/mobile/src/components/AppLoader/index.js b/apps/mobile/src/components/AppLoader/index.js
index 7c54e7b22..b40d62d58 100644
--- a/apps/mobile/src/components/AppLoader/index.js
+++ b/apps/mobile/src/components/AppLoader/index.js
@@ -1,4 +1,5 @@
import React, {useEffect, useState} from 'react';
+import {Appearance} from 'react-native';
import {SafeAreaView, View} from 'react-native';
import Animated, {Easing} from 'react-native-reanimated';
import AnimatedProgress from 'react-native-reanimated-progress-bar';
@@ -19,6 +20,7 @@ import {
ToastEvent
} from '../../services/EventManager';
import {editing} from '../../utils';
+import {COLOR_SCHEME_DARK} from '../../utils/Colors';
import {db} from '../../utils/DB';
import {
eOpenLoginDialog,
@@ -182,7 +184,10 @@ const AppLoader = ({onLoad}) => {
return loading ? (
<Animated.View
style={{
- backgroundColor: colors.bg,
+ backgroundColor:
+ Appearance.getColorScheme() === 'dark'
+ ? COLOR_SCHEME_DARK.bg
+ : colors.bg,
width: '100%',
height: '100%',
position: 'absolute',
@@ -191,7 +196,10 @@ const AppLoader = ({onLoad}) => {
}}>
<Animated.View
style={{
- backgroundColor: colors.bg,
+ backgroundColor:
+ Appearance.getColorScheme() === 'dark'
+ ? COLOR_SCHEME_DARK.bg
+ : colors.bg,
width: '100%',
height: '100%',
justifyContent: 'center',
diff --git a/apps/mobile/src/components/MergeEditor/index.js b/apps/mobile/src/components/MergeEditor/index.js
index de223f736..f654018ed 100644
--- a/apps/mobile/src/components/MergeEditor/index.js
+++ b/apps/mobile/src/components/MergeEditor/index.js
@@ -204,9 +204,10 @@ const MergeEditor = () => {
data: primaryData.data
? diff.clean(primaryData.data)
: primaryData.data,
- resolved: true,
type: primaryData.type,
- dateEdited:secondaryData.dateEdited + 1
+ dateEdited:primary.dateEdited,
+ remote:true,
+ dateResolved:secondaryData.dateEdited
},
id: note.id,
conflicted: false,
@@ -218,8 +219,9 @@ const MergeEditor = () => {
? diff.clean(secondaryData.data)
: secondaryData.data,
type: secondaryData.type,
- resolved: true,
- dateEdited:secondaryData.dateEdited
+ remote:true,
+ dateEdited:secondaryData.dateEdited,
+ dateResolved:secondaryData.dateEdited
},
id: note.id,
conflicted: false,
diff --git a/apps/mobile/src/provider/DefaultState.js b/apps/mobile/src/provider/DefaultState.js
index 4f951665c..431467192 100644
--- a/apps/mobile/src/provider/DefaultState.js
+++ b/apps/mobile/src/provider/DefaultState.js
@@ -1,21 +1,6 @@
+import { Appearance } from "react-native";
+import { COLOR_SCHEME_DARK, COLOR_SCHEME_LIGHT } from "../utils/Colors";
+const darkScheme = Appearance.getColorScheme() === "dark";
export const defaultState = {
- colors: {
- night: false,
- bg: 'white',
- fg: '#00c853',
- navbg: '#f6fbfc',
- nav: '#f0f0f0',
- pri: 'black',
- sec: 'white',
- accent: '#00c853',
- shade: '#00c85312',
- normal: 'black',
- icon: 'gray',
- errorBg: '#FFD2D2',
- errorText: '#D8000C',
- successBg: '#DFF2BF',
- successText: '#4F8A10',
- warningBg: '#FEEFB3',
- warningText: '#9F6000',
- }
+ colors: darkScheme ? COLOR_SCHEME_DARK : COLOR_SCHEME_LIGHT
};