Skip to content

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

open links in inappbrowser

ammarahm-eda6f49a39b570
diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.js
index c7ab21463..f488ddf16 100644
--- a/apps/mobile/src/views/Editor/Functions.js
+++ b/apps/mobile/src/views/Editor/Functions.js
@@ -13,6 +13,7 @@ import {
eShowGetPremium,
refreshNotesPage,
} from '../../utils/Events';
+import {openLinkInBrowser} from '../../utils/functions';
import {MMKV} from '../../utils/mmkv';
import {sideMenuRef, tabBarRef} from '../../utils/Refs';
import {normalize} from '../../utils/SizeUtils';
@@ -121,7 +122,12 @@ export function post(type, value = null) {
export const _onShouldStartLoadWithRequest = async (request) => {
if (request.url.includes('https')) {
- await Linking.openURL(request.url);
+ openLinkInBrowser(request.url, appColors)
+ .catch((e) => ToastEvent.show(e.message, 'error'))
+ .then((r) => {
+ console.log('closed');
+ });
+
return false;
} else {
return true;