mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 14:39:34 +01:00
remove console.logs
This commit is contained in:
@@ -125,7 +125,7 @@ export const ActionSheetComponent = ({
|
|||||||
const localRefresh = (type, nodispatch = false) => {
|
const localRefresh = (type, nodispatch = false) => {
|
||||||
if (!note || !note.dateCreated) return;
|
if (!note || !note.dateCreated) return;
|
||||||
let toAdd;
|
let toAdd;
|
||||||
console.log(type);
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'note': {
|
case 'note': {
|
||||||
toAdd = db.getNote(note.dateCreated);
|
toAdd = db.getNote(note.dateCreated);
|
||||||
@@ -136,9 +136,8 @@ export const ActionSheetComponent = ({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'topic': {
|
case 'topic': {
|
||||||
console.log(note, 'topics');
|
|
||||||
toAdd = db.getTopic(note.notebookId, note.title);
|
toAdd = db.getTopic(note.notebookId, note.title);
|
||||||
console.log(toAdd, 'heree');
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -486,7 +485,6 @@ export const ActionSheetComponent = ({
|
|||||||
if (!item.dateDeleted) {
|
if (!item.dateDeleted) {
|
||||||
localRefresh(item.type, true);
|
localRefresh(item.type, true);
|
||||||
}
|
}
|
||||||
console.log(note.dateCreated, 'here');
|
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
paddingBottom: 15,
|
paddingBottom: 15,
|
||||||
|
|||||||
@@ -38,12 +38,14 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
this.timestamp = null;
|
this.timestamp = null;
|
||||||
this.backPressCount = 0;
|
this.backPressCount = 0;
|
||||||
this.currentInputValue = null;
|
this.currentInputValue = null;
|
||||||
|
this.titleRef;
|
||||||
|
this.descriptionRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
open = () => {
|
open = () => {
|
||||||
refs = [];
|
refs = [];
|
||||||
let {toEdit} = this.props;
|
let {toEdit} = this.props;
|
||||||
console.log(toEdit);
|
|
||||||
if (toEdit && toEdit.type === 'notebook') {
|
if (toEdit && toEdit.type === 'notebook') {
|
||||||
let topicsList = [];
|
let topicsList = [];
|
||||||
toEdit.topics.forEach(item => {
|
toEdit.topics.forEach(item => {
|
||||||
@@ -211,7 +213,6 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
...getElevation(5),
|
...getElevation(5),
|
||||||
width: DDS.isTab ? '50%' : '80%',
|
width: DDS.isTab ? '50%' : '80%',
|
||||||
maxHeight: '80%',
|
maxHeight: '80%',
|
||||||
height: '80%',
|
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
backgroundColor: colors.bg,
|
backgroundColor: colors.bg,
|
||||||
paddingHorizontal: ph,
|
paddingHorizontal: ph,
|
||||||
@@ -238,6 +239,7 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
ref={ref => (this.titleRef = ref)}
|
||||||
style={{
|
style={{
|
||||||
padding: pv - 5,
|
padding: pv - 5,
|
||||||
borderWidth: 1.5,
|
borderWidth: 1.5,
|
||||||
@@ -265,10 +267,14 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
onChangeText={value => {
|
onChangeText={value => {
|
||||||
this.title = value;
|
this.title = value;
|
||||||
}}
|
}}
|
||||||
|
onSubmitEditing={() => {
|
||||||
|
this.descriptionRef.focus();
|
||||||
|
}}
|
||||||
placeholder="Title of notebook"
|
placeholder="Title of notebook"
|
||||||
placeholderTextColor={colors.icon}
|
placeholderTextColor={colors.icon}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
ref={ref => (this.descriptionRef = ref)}
|
||||||
style={{
|
style={{
|
||||||
padding: pv - 5,
|
padding: pv - 5,
|
||||||
borderWidth: 1.5,
|
borderWidth: 1.5,
|
||||||
@@ -296,6 +302,9 @@ export class AddNotebookDialog extends React.Component {
|
|||||||
onChangeText={value => {
|
onChangeText={value => {
|
||||||
this.description = value;
|
this.description = value;
|
||||||
}}
|
}}
|
||||||
|
onSubmitEditing={() => {
|
||||||
|
this.topicInputRef.focus();
|
||||||
|
}}
|
||||||
placeholder="write a description"
|
placeholder="write a description"
|
||||||
placeholderTextColor={colors.icon}
|
placeholderTextColor={colors.icon}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ export class Dialog extends Component {
|
|||||||
let {template, item} = this.props;
|
let {template, item} = this.props;
|
||||||
if (dialogActions.ACTION_TRASH === template.action) {
|
if (dialogActions.ACTION_TRASH === template.action) {
|
||||||
// delete item forever.
|
// delete item forever.
|
||||||
console.log('deleted forever');
|
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ class LoginDialog extends React.Component {
|
|||||||
ref={ref => (this.navigation = ref)}
|
ref={ref => (this.navigation = ref)}
|
||||||
onNavigationStateChange={state => {
|
onNavigationStateChange={state => {
|
||||||
this.routeIndex = state.index;
|
this.routeIndex = state.index;
|
||||||
console.log(state);
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export const Menu = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
setTags([...allTags]);
|
setTags([...allTags]);
|
||||||
console.log(allTags);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const listItems = [
|
const listItems = [
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ class MoveNoteDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
console.log(' i am called');
|
|
||||||
this.setState({
|
this.setState({
|
||||||
visible: true,
|
visible: true,
|
||||||
});
|
});
|
||||||
@@ -166,7 +165,6 @@ class MoveNoteDialog extends React.Component {
|
|||||||
ref={ref => (this.navigation = ref)}
|
ref={ref => (this.navigation = ref)}
|
||||||
onNavigationStateChange={state => {
|
onNavigationStateChange={state => {
|
||||||
this.routeIndex = state.index;
|
this.routeIndex = state.index;
|
||||||
console.log(state);
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default class NoteItem extends React.Component {
|
|||||||
pinned,
|
pinned,
|
||||||
index,
|
index,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
console.log('rendering', index);
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
@@ -241,8 +241,6 @@ export const NotebookItem = ({
|
|||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
activeOpacity={opacity}
|
activeOpacity={opacity}
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
console.log(selectedItemsList, item);
|
|
||||||
|
|
||||||
/* let noteIds = [];
|
/* let noteIds = [];
|
||||||
selectedItemsList.forEach(item => noteIds.push(item.dateCreated));
|
selectedItemsList.forEach(item => noteIds.push(item.dateCreated));
|
||||||
if (!noteToMove.notebook.notebook) {
|
if (!noteToMove.notebook.notebook) {
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ export default class PullToRefresh extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPanResponderMove = (event, gestureEvent) => {
|
onPanResponderMove = (event, gestureEvent) => {
|
||||||
console.log(this.prevScroll);
|
|
||||||
|
|
||||||
this.listRef.getScrollResponder().scrollTo({
|
this.listRef.getScrollResponder().scrollTo({
|
||||||
x: 0,
|
x: 0,
|
||||||
y: this.prevScroll + gestureEvent.dy * -1,
|
y: this.prevScroll + gestureEvent.dy * -1,
|
||||||
|
|||||||
@@ -121,9 +121,7 @@ export default class SideMenu extends React.Component {
|
|||||||
<TouchableWithoutFeedback onPress={() => this.openMenu(false)}>
|
<TouchableWithoutFeedback onPress={() => this.openMenu(false)}>
|
||||||
<Animated.View
|
<Animated.View
|
||||||
ref={ref => (this.overlay = ref)}
|
ref={ref => (this.overlay = ref)}
|
||||||
onTouchStart={() => {
|
onTouchStart={() => {}}
|
||||||
console.log('hello');
|
|
||||||
}}
|
|
||||||
style={{
|
style={{
|
||||||
display: 'none',
|
display: 'none',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|||||||
@@ -51,9 +51,7 @@ export class VaultDialog extends Component {
|
|||||||
if (n.content.cipher) {
|
if (n.content.cipher) {
|
||||||
try {
|
try {
|
||||||
item = await db.unlockNote(n.dateCreated, password, this.props.perm);
|
item = await db.unlockNote(n.dateCreated, password, this.props.perm);
|
||||||
} catch (error) {
|
} catch (error) {}
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
item = n;
|
item = n;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,9 +36,8 @@ function decrypt(password, data) {
|
|||||||
let key;
|
let key;
|
||||||
return Aes.pbkdf2(password, 'salt', 5000, 256).then(aes => {
|
return Aes.pbkdf2(password, 'salt', 5000, 256).then(aes => {
|
||||||
key = aes;
|
key = aes;
|
||||||
console.log(data, key);
|
|
||||||
return Aes.decrypt(data.cipher, key, data.iv).then(e => {
|
return Aes.decrypt(data.cipher, key, data.iv).then(e => {
|
||||||
console.log(e);
|
|
||||||
return e;
|
return e;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -218,7 +218,6 @@ const Editor = ({navigation, noMenu}) => {
|
|||||||
}, [noMenu]);
|
}, [noMenu]);
|
||||||
|
|
||||||
const onWebViewLoad = () => {
|
const onWebViewLoad = () => {
|
||||||
console.log('requesting focus');
|
|
||||||
//EditorWebView.requestFocus();
|
//EditorWebView.requestFocus();
|
||||||
if (noMenu) {
|
if (noMenu) {
|
||||||
post(
|
post(
|
||||||
@@ -266,7 +265,6 @@ const Editor = ({navigation, noMenu}) => {
|
|||||||
content = note.content;
|
content = note.content;
|
||||||
saveCounter = 0;
|
saveCounter = 0;
|
||||||
|
|
||||||
console.log(note);
|
|
||||||
if (title !== null || title === '') {
|
if (title !== null || title === '') {
|
||||||
post(
|
post(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
@@ -283,7 +281,6 @@ const Editor = ({navigation, noMenu}) => {
|
|||||||
} else if (note.content.delta) {
|
} else if (note.content.delta) {
|
||||||
post(JSON.stringify(note.content.delta));
|
post(JSON.stringify(note.content.delta));
|
||||||
} else {
|
} else {
|
||||||
console.log('herrree');
|
|
||||||
post(JSON.stringify({type: 'text', value: note.content.text}));
|
post(JSON.stringify({type: 'text', value: note.content.text}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const Folders = ({navigation}) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch({type: ACTIONS.NOTEBOOKS});
|
dispatch({type: ACTIONS.NOTEBOOKS});
|
||||||
console.log(notebooks);
|
|
||||||
let backhandler;
|
let backhandler;
|
||||||
if (isFocused) {
|
if (isFocused) {
|
||||||
backhandler = BackHandler.addEventListener(
|
backhandler = BackHandler.addEventListener(
|
||||||
|
|||||||
@@ -105,15 +105,13 @@ const ListsEditor = ({navigation}) => {
|
|||||||
deleteMode={deleteMode}
|
deleteMode={deleteMode}
|
||||||
addToDeleteList={index => {
|
addToDeleteList={index => {
|
||||||
let items = deleteItemsList;
|
let items = deleteItemsList;
|
||||||
console.log(items);
|
|
||||||
if (items.includes(index)) {
|
if (items.includes(index)) {
|
||||||
let i = items.indexOf(index);
|
let i = items.indexOf(index);
|
||||||
items.splice(i, 1);
|
items.splice(i, 1);
|
||||||
setDeleteItemsList(items);
|
setDeleteItemsList(items);
|
||||||
console.log(JSON.stringify(deleteItemsList), 'splice');
|
|
||||||
} else {
|
} else {
|
||||||
items[items.length] = index;
|
items[items.length] = index;
|
||||||
console.log(JSON.stringify(items), 'here');
|
|
||||||
|
|
||||||
setDeleteItemsList(items);
|
setDeleteItemsList(items);
|
||||||
}
|
}
|
||||||
@@ -160,7 +158,6 @@ const ListsEditor = ({navigation}) => {
|
|||||||
prevIndex = null;
|
prevIndex = null;
|
||||||
prevItem = null;
|
prevItem = null;
|
||||||
setListData(oldData);
|
setListData(oldData);
|
||||||
console.log(oldData);
|
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user