Skip to content

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

minor updates

ammarahm-edebfb451ed38f
diff --git a/apps/mobile/src/components/Header/index.js b/apps/mobile/src/components/Header/index.js
index db6742329..ee48a1862 100644
--- a/apps/mobile/src/components/Header/index.js
+++ b/apps/mobile/src/components/Header/index.js
@@ -46,8 +46,8 @@ export const Header = React.memo(
overflow: 'hidden',
borderBottomWidth: 1,
borderBottomColor: hide ? 'transparent' : colors.nav,
- justifyContent: 'space-between',
- },
+ justifyContent: 'space-between'
+ }
]}>
<View style={styles.leftBtnContainer}>
<HeaderLeftMenu headerMenuState={!isBack} currentScreen={screen} />
@@ -66,7 +66,7 @@ export const Header = React.memo(
<>
<View
style={{
- width: '80%',
+ width: '80%'
}}>
<SearchInput />
</View>
@@ -91,7 +91,7 @@ export const Header = React.memo(
</View>
);
},
- (prev, next) => prev.title === next.title,
+ (prev, next) => prev.title === next.title
);
const styles = StyleSheet.create({
@@ -102,13 +102,13 @@ const styles = StyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 12,
- width: '100%',
+ width: '100%'
},
leftBtnContainer: {
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
- flexShrink: 1,
+ flexShrink: 1
},
leftBtn: {
justifyContent: 'center',
@@ -117,17 +117,17 @@ const styles = StyleSheet.create({
width: 40,
borderRadius: 100,
marginLeft: -5,
- marginRight: 25,
+ marginRight: 25
},
rightBtnContainer: {
flexDirection: 'row',
- alignItems: 'center',
+ alignItems: 'center'
},
rightBtn: {
justifyContent: 'center',
alignItems: 'flex-end',
height: 40,
width: 40,
- paddingRight: 0,
- },
+ paddingRight: 0
+ }
});
diff --git a/apps/mobile/src/components/Header/title.js b/apps/mobile/src/components/Header/title.js
index dda118564..c38ba4608 100644
--- a/apps/mobile/src/components/Header/title.js
+++ b/apps/mobile/src/components/Header/title.js
@@ -12,12 +12,12 @@ export const Title = ({heading, headerColor}) => {
style={{
opacity: 1,
flexShrink: 1,
- flexDirection: 'row',
+ flexDirection: 'row'
}}>
<Heading
numberOfLines={1}
style={{
- flexWrap: 'wrap',
+ flexWrap: 'wrap'
}}
color={headerColor}>
<Heading color={colors.accent}>
diff --git a/apps/mobile/src/components/SimpleList/sectionheader.js b/apps/mobile/src/components/SimpleList/sectionheader.js
index 12a2076c4..356b53c5e 100644
--- a/apps/mobile/src/components/SimpleList/sectionheader.js
+++ b/apps/mobile/src/components/SimpleList/sectionheader.js
@@ -5,7 +5,7 @@ import {useSettingStore} from '../../provider/stores';
import {
eSendEvent,
eSubscribeEvent,
- eUnSubscribeEvent,
+ eUnSubscribeEvent
} from '../../services/EventManager';
import SettingsService from '../../services/SettingsService';
import {SORT} from '../../utils';
@@ -22,10 +22,10 @@ export const SectionHeader = ({item, index, type, title}) => {
const {colors} = state;
const {fontScale} = useWindowDimensions();
const [groupOptions, setGroupOptions] = useState(
- db.settings?.getGroupOptions(type),
+ db.settings?.getGroupOptions(type)
);
let groupBy = Object.keys(SORT).find(
- key => SORT[key] === groupOptions.groupBy,
+ key => SORT[key] === groupOptions.groupBy
);
const color = COLORS_NOTE[title.toLowerCase()] || colors.accent;
@@ -60,7 +60,7 @@ export const SectionHeader = ({item, index, type, title}) => {
backgroundColor: colors.nav,
alignSelf: 'center',
borderRadius: 5,
- marginVertical: 5,
+ marginVertical: 5
}}>
<TouchableOpacity
onPress={() => {
@@ -70,7 +70,7 @@ export const SectionHeader = ({item, index, type, title}) => {
hitSlop={{top: 10, left: 10, right: 30, bottom: 15}}
style={{
height: '100%',
- justifyContent: 'center',
+ justifyContent: 'center'
}}>
<Heading
color={color}
@@ -78,7 +78,7 @@ export const SectionHeader = ({item, index, type, title}) => {
style={{
minWidth: 60,
alignSelf: 'center',
- textAlignVertical: 'center',
+ textAlignVertical: 'center'
}}>
{!item.title || item.title === '' ? 'Pinned' : item.title}
</Heading>
@@ -87,7 +87,7 @@ export const SectionHeader = ({item, index, type, title}) => {
<View
style={{
flexDirection: 'row',
- alignItems: 'center',
+ alignItems: 'center'
}}>
{index === 0 ? (
<>
@@ -109,7 +109,7 @@ export const SectionHeader = ({item, index, type, title}) => {
marginRight:
type === 'notes' || type === 'home' || type === 'notebooks'
? 10
- : 0,
+ : 0
}}
type="gray"
iconPosition="right"
@@ -118,7 +118,7 @@ export const SectionHeader = ({item, index, type, title}) => {
<ActionIcon
customStyle={{
width: 25,
- height: 25,
+ height: 25
}}
color={colors.icon}
name={listMode == 'compact' ? 'view-list' : 'view-list-outline'}
@@ -127,10 +127,10 @@ export const SectionHeader = ({item, index, type, title}) => {
type !== 'notebooks'
? 'notesListMode'
: 'notebooksListMode',
- listMode === 'normal' ? 'compact' : 'normal',
+ listMode === 'normal' ? 'compact' : 'normal'
);
}}
- size={SIZE.md}
+ size={SIZE.lg - 2}
/>
) : null}
</>
diff --git a/apps/mobile/src/provider/stores.ts b/apps/mobile/src/provider/stores.ts
index 774d8264c..a27b2b6cd 100644
--- a/apps/mobile/src/provider/stores.ts
+++ b/apps/mobile/src/provider/stores.ts
@@ -2,7 +2,7 @@ import { Platform } from 'react-native';
import { Dimensions } from 'react-native';
import create from 'zustand';
import PremiumService from '../services/PremiumService';
-import { history, SORT, GROUP, sortSettings, SUBSCRIPTION_STATUS } from '../utils';
+import { history, SUBSCRIPTION_STATUS } from '../utils';
import { db } from '../utils/DB';
import { MMKV } from '../utils/mmkv';
import {
diff --git a/apps/mobile/src/services/PremiumService.js b/apps/mobile/src/services/PremiumService.js
index 26f1508de..eb9ff1a8e 100644
--- a/apps/mobile/src/services/PremiumService.js
+++ b/apps/mobile/src/services/PremiumService.js
@@ -38,7 +38,6 @@ async function setPremiumStatus() {
if (!get()) {
await RNIap.initConnection();
products = await RNIap.getSubscriptions(itemSkus);
- console.log(products);
} else {
await subscriptions.clear();
}
diff --git a/apps/mobile/src/services/SettingsService.js b/apps/mobile/src/services/SettingsService.js
index 124f3ad29..9ea704b98 100644
--- a/apps/mobile/src/services/SettingsService.js
+++ b/apps/mobile/src/services/SettingsService.js
@@ -1,12 +1,12 @@
-import {Platform} from 'react-native';
-import {enabled} from 'react-native-privacy-snapshot';
-import {updateEvent} from '../components/DialogManager/recievers';
-import {Actions} from '../provider/Actions';
-import {useSettingStore} from '../provider/stores';
-import {AndroidModule, preloadImages, sortSettings} from '../utils';
-import {getColorScheme} from '../utils/ColorUtils';
-import {MMKV} from '../utils/mmkv';
-import {scale, updateSize} from '../utils/SizeUtils';
+import { Platform } from 'react-native';
+import { enabled } from 'react-native-privacy-snapshot';
+import { updateEvent } from '../components/DialogManager/recievers';
+import { Actions } from '../provider/Actions';
+import { useSettingStore } from '../provider/stores';
+import { AndroidModule, preloadImages } from '../utils';
+import { getColorScheme } from '../utils/ColorUtils';
+import { MMKV } from '../utils/mmkv';
+import { scale, updateSize } from '../utils/SizeUtils';
export const defaultSettings = {
showToolbarOnTop: false,
@@ -50,6 +50,9 @@ async function init() {
if (!settings.appLockMode) {
settings.appLockMode = 'none';
}
+ if (!settings.hasOwnProperty('telemetry')) {
+ settings.telemetry = true;
+ }
if (!settings.notesListMode) {
settings.notesListMode = 'normal';
}
diff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/views/Notebook/index.js
index e5e36cb53..e1e79c32f 100644
--- a/apps/mobile/src/views/Notebook/index.js
+++ b/apps/mobile/src/views/Notebook/index.js
@@ -8,7 +8,7 @@ import SimpleList from '../../components/SimpleList';
import {
eSendEvent,
eSubscribeEvent,
- eUnSubscribeEvent,
+ eUnSubscribeEvent
} from '../../services/EventManager';
import Navigation from '../../services/Navigation';
import SearchService from '../../services/SearchService';
@@ -18,15 +18,15 @@ import {
eOnNewTopicAdded,
eOpenAddNotebookDialog,
eOpenAddTopicDialog,
- eScrollEvent,
+ eScrollEvent
} from '../../utils/Events';
export const Notebook = ({route, navigation}) => {
const [topics, setTopics] = useState(
groupArray(
route.params.notebook?.topics || [],
- db.settings.getGroupOptions('topics'),
- ),
+ db.settings.getGroupOptions('topics')
+ )
);
let params = route.params;
let ranAfterInteractions = false;
@@ -42,7 +42,7 @@ export const Notebook = ({route, navigation}) => {
if (notebook) {
params.notebook = notebook;
setTopics(
- groupArray(notebook.topics, db.settings.getGroupOptions('topics')),
+ groupArray(notebook.topics, db.settings.getGroupOptions('topics'))
);
params.title = params.notebook.title;
}
@@ -73,7 +73,7 @@ export const Notebook = ({route, navigation}) => {
Navigation.setHeaderState('Notebook', params, {
heading: params.title,
id: params.notebook.id,
- type: 'notebook',
+ type: 'notebook'
});
};
@@ -97,7 +97,7 @@ export const Notebook = ({route, navigation}) => {
placeholder: `Search in "${params.title}"`,
data: topics,
type: 'topics',
- title: params.title,
+ title: params.title
});
};
@@ -119,8 +119,8 @@ export const Notebook = ({route, navigation}) => {
{
icon: 'pencil',
title: 'Edit notebook',
- func: () => eSendEvent(eOpenAddNotebookDialog, params.notebook),
- },
+ func: () => eSendEvent(eOpenAddNotebookDialog, params.notebook)
+ }
]}
/>
</ContainerTopSection>
@@ -137,7 +137,7 @@ export const Notebook = ({route, navigation}) => {
onPress: () => {
eSendEvent(eOpenAddNotebookDialog, params.notebook);
},
- icon: 'pencil',
+ icon: 'pencil'
}}
focused={() => navigation.isFocused()}
placeholderData={{
@@ -145,7 +145,7 @@ export const Notebook = ({route, navigation}) => {
paragraph: 'You have not added any topics yet.',
button: 'Add a topic',
action: _onPressBottomButton,
- loading: 'Loading notebook topics',
+ loading: 'Loading notebook topics'
}}
/>