Android: Fixes #4071: Make sure newly created note is saved after sharing content with the app (#4082)

This commit is contained in:
Roman Musin authored and GitHub committed 2020-11-14 16:02:14 +00:00
1 parent cee42a1296
commit fb5f20b308
1 file changed
+6 -6
@@ -14,11 +14,11 @@ export default class BackButtonDialogBox extends DialogBox {
};
}
componentDidMount() {
BackButtonService.addHandler(this.backHandler_);
}
componentWillUnmount() {
BackButtonService.removeHandler(this.backHandler_);
async componentDidUpdate() {
if (this.state.isVisible) {
BackButtonService.addHandler(this.backHandler_);
} else {
BackButtonService.removeHandler(this.backHandler_);
}
}
}