mirror of https://github.com/M66B/FairEmail.git
prevent crash
This commit is contained in:
parent
3ed81bb63f
commit
2165f062b2
|
@ -87,12 +87,21 @@ public class NavMenuItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
void onClick() {
|
void onClick() {
|
||||||
click.run();
|
try {
|
||||||
|
click.run();
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean onLongClick() {
|
boolean onLongClick() {
|
||||||
if (longClick != null)
|
try {
|
||||||
longClick.run();
|
if (longClick != null)
|
||||||
return (longClick != null);
|
longClick.run();
|
||||||
|
return (longClick != null);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue