Skip to content

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

send tablet info to editor

ammarahm-ed25781dd077cf
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index 4b0d6264b..674a97d26 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -1,25 +1,24 @@
-import { createRef } from 'react';
-import { Linking, Platform } from 'react-native';
+import {createRef} from 'react';
+import {Linking, Platform} from 'react-native';
import SplashScreen from 'react-native-splash-screen';
-import { updateEvent } from '../../components/DialogManager/recievers';
-import { Actions } from '../../provider/Actions';
-import { DDS } from '../../services/DeviceDetection';
-import { eSendEvent, sendNoteEditedEvent } from '../../services/EventManager';
+import {updateEvent} from '../../components/DialogManager/recievers';
+import {Actions} from '../../provider/Actions';
+import {DDS} from '../../services/DeviceDetection';
+import {eSendEvent, sendNoteEditedEvent} from '../../services/EventManager';
import IntentService from '../../services/IntentService';
-import { editing } from '../../utils';
-import { COLORS_NOTE, COLOR_SCHEME } from '../../utils/Colors';
-import { hexToRGBA } from '../../utils/ColorUtils';
-import { db } from '../../utils/DB';
+import {editing} from '../../utils';
+import {COLORS_NOTE, COLOR_SCHEME} from '../../utils/Colors';
+import {hexToRGBA} from '../../utils/ColorUtils';
+import {db} from '../../utils/DB';
import {
eOnLoadNote,
-
eShowGetPremium,
- refreshNotesPage
+ refreshNotesPage,
} from '../../utils/Events';
-import { MMKV } from '../../utils/mmkv';
-import { sideMenuRef, tabBarRef } from '../../utils/Refs';
-import { normalize } from '../../utils/SizeUtils';
-import { sleep, timeConverter } from '../../utils/TimeUtils';
+import {MMKV} from '../../utils/mmkv';
+import {sideMenuRef, tabBarRef} from '../../utils/Refs';
+import {normalize} from '../../utils/SizeUtils';
+import {sleep, timeConverter} from '../../utils/TimeUtils';
export const EditorWebView = createRef();
@@ -89,13 +88,13 @@ export const INJECTED_JAVASCRIPT = (premium) =>
premium
? `(function() {
setTimeout(() => {
- loadAction(true,false);
+ loadAction(true,${DDS.isLargeTablet()});
},100)
})();`
: `(function() {
setTimeout(() => {
- loadAction(false,false);
+ loadAction(false,${DDS.isLargeTablet()});
},100)
})();`;
@@ -409,7 +408,7 @@ async function loadEditorState() {
if (appState) {
appState = JSON.parse(appState);
if (appState.editing && appState.note && appState.note.id) {
- console.log("loading note in editor")
+ console.log('loading note in editor');
eSendEvent(eOnLoadNote, appState.note);
tabBarRef.current?.goToPage(1);
MMKV.removeItem('appState');