1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Mobile: Long press on images or other attachments to share them (#3367)

This commit is contained in:
Roman Musin
2020-10-12 10:25:59 +01:00
committed by GitHub
parent 5fd0408365
commit ea878fb614
8 changed files with 112 additions and 4 deletions

View File

@ -0,0 +1,24 @@
const { BackButtonService } = require('lib/services/back-button.js');
const DialogBox = require('react-native-dialogbox').default;
export default class BackButtonDialogBox extends DialogBox {
constructor() {
super();
this.backHandler_ = () => {
if (this.state.isVisible) {
this.close();
return true;
}
return false;
};
}
componentDidMount() {
BackButtonService.addHandler(this.backHandler_);
}
componentWillUnmount() {
BackButtonService.removeHandler(this.backHandler_);
}
}