mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
update all ToastEvent functions
This commit is contained in:
@@ -32,7 +32,7 @@ import KeepAwake from '@sayem314/react-native-keep-awake';
|
||||
import {timeConverter} from '../../utils/TimeUtils';
|
||||
import tiny from '../../views/Editor/tiny/tiny';
|
||||
import diff from '../../utils/differ';
|
||||
import { openLinkInBrowser } from '../../utils/functions';
|
||||
import {openLinkInBrowser} from '../../utils/functions';
|
||||
|
||||
const {Value, timing} = Animated;
|
||||
|
||||
@@ -133,10 +133,17 @@ const MergeEditor = () => {
|
||||
const _onShouldStartLoadWithRequest = (request) => {
|
||||
if (request.url.includes('http')) {
|
||||
openLinkInBrowser(request.url, colors)
|
||||
.catch((e) => ToastEvent.show(e.message, 'error'))
|
||||
.then((r) => {
|
||||
console.log('closed');
|
||||
});
|
||||
.catch((e) =>
|
||||
ToastEvent.show({
|
||||
title: 'Failed to open link',
|
||||
message: e.message,
|
||||
type: 'success',
|
||||
context: 'local',
|
||||
}),
|
||||
)
|
||||
.then((r) => {
|
||||
console.log('closed');
|
||||
});
|
||||
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user