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

Mobile: Also do multi-selection from search page

This commit is contained in:
Laurent Cozic
2017-11-23 18:41:35 +00:00
parent acc4eb5d28
commit d8b19f7d08
5 changed files with 56 additions and 33 deletions

View File

@ -8,7 +8,8 @@ const { Keyboard } = require('react-native');
let dialogs = {};
dialogs.confirm = (parentComponent, message) => {
if (!'dialogbox' in parentComponent) throw new Error('A "dialogbox" component must be defined on the parent component!');
if (!parentComponent) throw new Error('parentComponent is required');
if (!('dialogbox' in parentComponent)) throw new Error('A "dialogbox" component must be defined on the parent component!');
return new Promise((resolve, reject) => {
Keyboard.dismiss();
@ -33,7 +34,8 @@ dialogs.confirm = (parentComponent, message) => {
};
dialogs.pop = (parentComponent, message, buttons) => {
if (!'dialogbox' in parentComponent) throw new Error('A "dialogbox" component must be defined on the parent component!');
if (!parentComponent) throw new Error('parentComponent is required');
if (!('dialogbox' in parentComponent)) throw new Error('A "dialogbox" component must be defined on the parent component!');
return new Promise((resolve, reject) => {
Keyboard.dismiss();