mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 14:09:34 +01:00
clear console.log statements
This commit is contained in:
@@ -331,7 +331,6 @@ const App = () => {
|
||||
eSendEvent(eOpenSideMenu);
|
||||
db.version()
|
||||
.then((ver) => {
|
||||
console.log(ver,'version');
|
||||
if (ver.mobile > APP_VERSION) {
|
||||
eSendEvent('updateDialog', ver);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ function autosize() {
|
||||
ele.innerHTML = document
|
||||
.getElementById(titleInput)
|
||||
.value.replace(/\n/g, '<br/>');
|
||||
console.log(document.getElementById('titlebar').scrollHeight);
|
||||
//console.log(document.getElementById('titlebar').scrollHeight);
|
||||
let newHeight = document.getElementById('titlebar').scrollHeight;
|
||||
let css = document.createElement('style');
|
||||
css.type = 'text/css';
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
) !== false
|
||||
) {
|
||||
this.lastMatch = match;
|
||||
console.log("Quill match made (" + match.name + ")");
|
||||
//console.log("Quill match made (" + match.name + ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
) !== false
|
||||
) {
|
||||
this.lastMatch = match;
|
||||
console.log("Quill match made (" + match.name + ")");
|
||||
//"Quill match made (" + match.name + ")");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ function autosize() {
|
||||
ele.innerHTML = document
|
||||
.getElementById(titleInput)
|
||||
.value.replace(/\n/g, '<br/>');
|
||||
console.log(document.getElementById('titlebar').scrollHeight);
|
||||
let newHeight = document.getElementById('titlebar').scrollHeight;
|
||||
let css = document.createElement('style');
|
||||
css.type = 'text/css';
|
||||
|
||||
@@ -65,7 +65,7 @@ export const ActionSheetTagsSection = ({item, close}) => {
|
||||
});
|
||||
tagToAdd = '';
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
//console.log(e.message);
|
||||
ToastEvent.show(e.message, 'error', 'local');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -189,7 +189,7 @@ export const ActionSheetComponent = ({
|
||||
try {
|
||||
await deleteItems(note);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
//console.log(e);
|
||||
}
|
||||
}
|
||||
close();
|
||||
|
||||
@@ -214,7 +214,7 @@ export class AddNotebookDialog extends React.Component {
|
||||
topics: prevTopics,
|
||||
});
|
||||
this.currentInputValue = null;
|
||||
console.log('edit topic is', this.state.editTopic);
|
||||
//console.log('edit topic is', this.state.editTopic);
|
||||
if (this.state.editTopic) {
|
||||
this.topicInputRef.current?.blur();
|
||||
Keyboard.dismiss();
|
||||
|
||||
@@ -62,7 +62,7 @@ export class AddTopicDialog extends React.Component {
|
||||
|
||||
open = async (notebookId) => {
|
||||
let id = notebookId || this.props.notebookID;
|
||||
console.log(notebookId)
|
||||
//console.log(notebookId)
|
||||
this.notebook = await db.notebooks.notebook(id).data
|
||||
this.setState({
|
||||
visible: true,
|
||||
|
||||
@@ -206,7 +206,7 @@ const ExportDialog = () => {
|
||||
showOpenWithDialog: true,
|
||||
showAppsSuggestions: true,
|
||||
}).catch((e) => {
|
||||
console.log(e);
|
||||
//console.log(e);
|
||||
ToastEvent.show(
|
||||
`No application found to open ${result.name} file`,
|
||||
);
|
||||
|
||||
@@ -83,7 +83,7 @@ const Input = ({
|
||||
isError = value === customValidator();
|
||||
break;
|
||||
}
|
||||
console.log('isError', isError, error);
|
||||
//console.log('isError', isError, error);
|
||||
|
||||
if (validationType === 'password') {
|
||||
let hasError = false;
|
||||
|
||||
@@ -141,23 +141,22 @@ const MergeEditor = () => {
|
||||
};
|
||||
|
||||
const onMessageFromPrimaryWebView = (evt) => {
|
||||
console.log(evt.nativeEvent.data);
|
||||
|
||||
if (evt.nativeEvent.data !== '') {
|
||||
let data = JSON.parse(evt.nativeEvent.data);
|
||||
console.log(data);
|
||||
|
||||
if (data.type === 'delta') {
|
||||
console.log(data.data);
|
||||
primaryData = data.data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const onMessageFromSecondaryWebView = (evt) => {
|
||||
console.log(data.data);
|
||||
|
||||
if (evt.nativeEvent.data === '') {
|
||||
let data = JSON.parse(evt.nativeEvent.data);
|
||||
if (data.type === 'delta') {
|
||||
console.log(data.data);
|
||||
|
||||
secondaryData = data.data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ const MoveNoteDialog = () => {
|
||||
};
|
||||
|
||||
const update = (note) => {
|
||||
console.log(note.notebooks.length);
|
||||
setNote(note);
|
||||
};
|
||||
|
||||
@@ -138,7 +137,7 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
|
||||
let noteIds = [];
|
||||
selectedItemsList.forEach((i) => noteIds.push(i.id));
|
||||
console.log(noteIds, 'NOTE IDS');
|
||||
|
||||
await db.notes.move(
|
||||
{
|
||||
topic: item.id,
|
||||
|
||||
@@ -52,13 +52,13 @@ class PremiumDialog extends React.Component {
|
||||
});
|
||||
await RNIap.initConnection();
|
||||
let prod = await RNIap.getSubscriptions(itemSkus);
|
||||
console.log(prod);
|
||||
|
||||
this.setState({
|
||||
products: prod,
|
||||
product: prod[0],
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e, 'SKU ERROR');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class PremiumDialog extends React.Component {
|
||||
try {
|
||||
await this.getSkus();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
}}
|
||||
onClose={() => {
|
||||
@@ -264,7 +264,7 @@ class PremiumDialog extends React.Component {
|
||||
)
|
||||
.then((r) => {})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
|
||||
} catch (e) {
|
||||
setRestoring(false);
|
||||
ToastEvent.show(e.message, 'error', 'local');
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
|
||||
|
||||
setFiles(files);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ const ActionStrip = ({note, setActionStrip}) => {
|
||||
|
||||
setActionStrip(false);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
},
|
||||
visible: note.type !== 'note',
|
||||
@@ -239,7 +239,7 @@ const ActionStrip = ({note, setActionStrip}) => {
|
||||
try {
|
||||
await deleteItems(note);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
setActionStrip(false);
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ export const NotebookItemWrapper = ({
|
||||
|
||||
const onPress = () => {
|
||||
if (selectionMode) {
|
||||
console.log(item.title);
|
||||
|
||||
onLongPress();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ export class VaultDialog extends Component {
|
||||
message: m,
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ export const reducer = (state, action) => {
|
||||
switch (action.type) {
|
||||
|
||||
case Actions.ALL: {
|
||||
console.log(sortSettings.sortOrder,'SORT ORDER');
|
||||
return {
|
||||
...state,
|
||||
notes: db.notes.group(
|
||||
@@ -55,7 +54,6 @@ export const reducer = (state, action) => {
|
||||
};
|
||||
}
|
||||
case Actions.NOTES:
|
||||
console.log(sortSettings.sortOrder,'SORT ORDER');
|
||||
return {
|
||||
...state,
|
||||
notes: db.notes.group(
|
||||
|
||||
@@ -9,7 +9,6 @@ const MS_DAY = 86400000;
|
||||
const MS_WEEK = MS_DAY * 7;
|
||||
|
||||
async function run() {
|
||||
console.log('exporting backup data');
|
||||
if (Platform.OS === 'android') {
|
||||
let granted = await storage.requestPermission();
|
||||
if (!granted) {
|
||||
@@ -20,14 +19,11 @@ async function run() {
|
||||
let backup;
|
||||
let error;
|
||||
try {
|
||||
console.log('exporting backup data');
|
||||
backup = await db.backup.export(
|
||||
'mobile',
|
||||
SettingsService.get().encryptedBackups,
|
||||
);
|
||||
console.log('backup data gotten');
|
||||
} catch (e) {
|
||||
console.log('error', e);
|
||||
error = true;
|
||||
}
|
||||
if (!error) {
|
||||
@@ -58,33 +54,32 @@ async function checkBackupRequired(type) {
|
||||
lastBackupDate = parseInt(lastBackupDate);
|
||||
|
||||
if (type === 'daily') {
|
||||
console.log('backing up data daily!');
|
||||
now = new Date(now);
|
||||
lastBackupDate = new Date(lastBackupDate);
|
||||
|
||||
if (now.getUTCDate() > lastBackupDate.getUTCDate()) {
|
||||
console.log('backup is needed');
|
||||
|
||||
return true;
|
||||
} else if (
|
||||
(now.getUTCDate() === lastBackupDate.getUTCDate() &&
|
||||
now.getUTCFullYear() > lastBackupDate.getUTCFullYear()) ||
|
||||
now.getUTCMonth() > lastBackupDate.getUTCMonth()
|
||||
) {
|
||||
console.log('backup is needed');
|
||||
|
||||
return true;
|
||||
} else {
|
||||
console.log('backup is not needed');
|
||||
|
||||
return false;
|
||||
}
|
||||
} else if (type === 'weekly') {
|
||||
if (lastBackupDate + MS_WEEK < now) {
|
||||
console.log('backup is needed');
|
||||
|
||||
return true;
|
||||
} else {
|
||||
false;
|
||||
}
|
||||
} else {
|
||||
console.log('Backups are disabled');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ToastAndroid } from 'react-native';
|
||||
import {Linking, NativeModules, Platform} from 'react-native';
|
||||
const {ReceiveSharingIntent} = NativeModules;
|
||||
let currentIntent = null;
|
||||
@@ -23,7 +24,6 @@ function getIntent() {
|
||||
reject(e);
|
||||
}
|
||||
if (!_data) {
|
||||
console.log(_data);
|
||||
return;
|
||||
}
|
||||
setIntent(_data, resolve, reject);
|
||||
|
||||
@@ -68,7 +68,6 @@ async function set(name, value) {
|
||||
}
|
||||
|
||||
function get() {
|
||||
console.log(settings.useSystemTheme,'getting')
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ async function read(key, isArray = false) {
|
||||
}
|
||||
|
||||
async function write(key, data) {
|
||||
console.log(key, data);
|
||||
return await MMKV.setItem(
|
||||
key,
|
||||
typeof data === 'string' ? data : JSON.stringify(data),
|
||||
@@ -85,10 +84,9 @@ async function deriveCryptoKey(name, data) {
|
||||
credentials.key,
|
||||
CRYPT_CONFIG,
|
||||
);
|
||||
console.log(credentials.key);
|
||||
return credentials.key;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +102,7 @@ async function getCryptoKey(name) {
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +111,7 @@ async function removeCryptoKey(name) {
|
||||
let result = await Keychain.resetInternetCredentials('notesnook');
|
||||
return result;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +146,7 @@ async function checkAndCreateDir(path) {
|
||||
await RNFetchBlob.fs.mkdir(dir);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
await RNFetchBlob.fs.mkdir(dir);
|
||||
} finally {
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ export const Notebook = ({route, navigation}) => {
|
||||
});
|
||||
|
||||
if (!pageIsLoaded) {
|
||||
console.log('returning since page is not loaded');
|
||||
pageIsLoaded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ export const Search = ({route, navigation}) => {
|
||||
const onFocus = useCallback(() => {
|
||||
sleep(300).then(() => inputRef.current?.focus());
|
||||
if (!pageIsLoaded) {
|
||||
console.log('returning since page is not loaded search');
|
||||
pageIsLoaded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,6 @@ export const Settings = ({navigation}) => {
|
||||
navigation.addListener('focus', onFocus);
|
||||
db.version()
|
||||
.then((ver) => {
|
||||
console.log(ver);
|
||||
setVersion(ver);
|
||||
})
|
||||
.catch(console.log);
|
||||
@@ -1019,7 +1018,6 @@ const SettingsBackupAndRestore = () => {
|
||||
paragraph:
|
||||
"All your backups are stored in 'Phone Storage/Notesnook/backups/' folder",
|
||||
});
|
||||
console.log('running backup now');
|
||||
await Backup.run();
|
||||
eSendEvent(eCloseProgressDialog);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user