mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-20 13:39:33 +01:00
correctly update global state on change
This commit is contained in:
@@ -14,6 +14,8 @@ import {opacity, ph, pv, SIZE, WEIGHT} from '../../utils/SizeUtils';
|
||||
import {db} from '../../utils/DB';
|
||||
import {DDS} from '../../services/DeviceDetection';
|
||||
import Seperator from '../Seperator';
|
||||
import { updateEvent } from '../DialogManager/recievers';
|
||||
import { Actions } from '../../provider/Actions';
|
||||
|
||||
export class AddTopicDialog extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -41,6 +43,7 @@ export class AddTopicDialog extends React.Component {
|
||||
await db.notebooks.notebook(topic.notebookId).topics.add(topic);
|
||||
}
|
||||
this.close();
|
||||
updateEvent({type:Actions.NOTEBOOKS})
|
||||
eSendEvent(eOnNewTopicAdded);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user