A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
prevent fontScale from being null in some cases.
ammarahm-edcad15ddbea10
diff --git a/apps/mobile/App.js b/apps/mobile/App.jsindex 2867f1a18..641e1c9a6 100644--- a/apps/mobile/App.js+++ b/apps/mobile/App.js@@ -57,14 +57,17 @@ const App = () => {let s = await MMKV.getString('settings');if (typeof s !== 'string') {s = defaultState.settings;-s = JSON.stringify(s);+ s.fontScale = 1;await MMKV.setString('settings', s);dispatch({type: ACTIONS.SETTINGS, s});} else {s = JSON.parse(s);- scale.fontScale = s.fontScale;-+ if (s.fontScale) {+ scale.fontScale = s.fontScale;+ } else {+ scale.fontScale = 1;+ }updateSize();dispatch({type: ACTIONS.SETTINGS, settings: {...s}});diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.jsindex f6cc52d49..de0ef521a 100644--- a/apps/mobile/src/views/Settings/index.js+++ b/apps/mobile/src/views/Settings/index.js@@ -434,7 +434,7 @@ export const Settings = ({navigation}) => {textAlignVertical: 'center',color: colors.pri,}}>- {settings.fontScale + 'X'}+ {settings.fontScale ? settings.fontScale + 'X' : '1X'}</Text></View></TouchableOpacity>