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