mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-18 20:49:36 +01:00
fix: improve sidebar performance
This commit is contained in:
@@ -26,7 +26,7 @@ import Icon from 'react-native-vector-icons/Feather';
|
||||
import {getElevation, h, w, timeSince, ToastEvent} from '../../utils/utils';
|
||||
import {FlatList, TextInput} from 'react-native-gesture-handler';
|
||||
import {useForceUpdate} from '../../views/ListsEditor';
|
||||
import {storage} from '../../../App';
|
||||
import {db} from '../../../App';
|
||||
|
||||
export const AddTopicDialog = ({
|
||||
visible,
|
||||
@@ -44,7 +44,7 @@ export const AddTopicDialog = ({
|
||||
if (!title)
|
||||
return ToastEvent.show('Title is required', 'error', 3000, () => {}, '');
|
||||
console.log(notebookID, title);
|
||||
storage.addTopicToNotebook(notebookID, title);
|
||||
db.addTopicToNotebook(notebookID, title);
|
||||
ToastEvent.show('New topic added', 'success', 3000, () => {}, '');
|
||||
close(true);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user