mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
remove in app browser extension
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import { Linking } from 'react-native';
|
import { Linking } from 'react-native';
|
||||||
import { InAppBrowser } from 'react-native-inappbrowser-reborn';
|
|
||||||
import { history } from '.';
|
import { history } from '.';
|
||||||
import { useMenuStore, useSelectionStore } from '../stores/stores';
|
|
||||||
import { eSendEvent, ToastEvent } from '../services/event-manager';
|
import { eSendEvent, ToastEvent } from '../services/event-manager';
|
||||||
import Navigation from '../services/navigation';
|
import Navigation from '../services/navigation';
|
||||||
|
import SearchService from '../services/search';
|
||||||
|
import { useMenuStore, useSelectionStore } from '../stores/stores';
|
||||||
import { db } from './database';
|
import { db } from './database';
|
||||||
import { eClearEditor } from './events';
|
import { eClearEditor } from './events';
|
||||||
import SearchService from '../services/search';
|
|
||||||
|
|
||||||
export const deleteItems = async item => {
|
export const deleteItems = async item => {
|
||||||
if (item && db.monographs.isPublished(item.id)) {
|
if (item && db.monographs.isPublished(item.id)) {
|
||||||
@@ -118,27 +117,7 @@ export const deleteItems = async item => {
|
|||||||
export const openLinkInBrowser = async (link, colors) => {
|
export const openLinkInBrowser = async (link, colors) => {
|
||||||
try {
|
try {
|
||||||
const url = link;
|
const url = link;
|
||||||
if (await InAppBrowser.isAvailable()) {
|
Linking.openURL(url);
|
||||||
await InAppBrowser.open(url, {
|
|
||||||
// iOS Properties
|
|
||||||
dismissButtonStyle: 'cancel',
|
|
||||||
preferredBarTintColor: colors.accent,
|
|
||||||
preferredControlTintColor: 'white',
|
|
||||||
readerMode: false,
|
|
||||||
animated: true,
|
|
||||||
modalPresentationStyle: 'fullScreen',
|
|
||||||
modalTransitionStyle: 'coverVertical',
|
|
||||||
modalEnabled: true,
|
|
||||||
enableBarCollapsing: false,
|
|
||||||
// Android Properties
|
|
||||||
showTitle: true,
|
|
||||||
toolbarColor: colors.accent,
|
|
||||||
secondaryToolbarColor: 'black',
|
|
||||||
enableUrlBarHiding: true,
|
|
||||||
enableDefaultShare: true,
|
|
||||||
forceCloseOnRedirection: false
|
|
||||||
});
|
|
||||||
} else Linking.openURL(url);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import * as RNIap from 'react-native-iap';
|
import * as RNIap from 'react-native-iap';
|
||||||
import { enabled } from 'react-native-privacy-snapshot';
|
import { enabled } from 'react-native-privacy-snapshot';
|
||||||
import { doInBackground, editing } from '..';
|
import { editing } from '..';
|
||||||
import { Walkthrough } from '../../components/walkthroughs';
|
import { Walkthrough } from '../../components/walkthroughs';
|
||||||
import {
|
import {
|
||||||
EditorWebView,
|
EditorWebView,
|
||||||
@@ -37,7 +37,7 @@ import {
|
|||||||
} from '../../services/message';
|
} from '../../services/message';
|
||||||
import PremiumService from '../../services/premium';
|
import PremiumService from '../../services/premium';
|
||||||
import SettingsService from '../../services/settings';
|
import SettingsService from '../../services/settings';
|
||||||
import Sync, { ignoredMessages } from '../../services/sync';
|
import Sync from '../../services/sync';
|
||||||
import {
|
import {
|
||||||
clearAllStores,
|
clearAllStores,
|
||||||
initialize,
|
initialize,
|
||||||
|
|||||||
Reference in New Issue
Block a user