1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

prevent crash

This commit is contained in:
M66B 2020-03-20 07:57:45 +01:00
parent 3ed81bb63f
commit 2165f062b2

View file

@ -87,12 +87,21 @@ public class NavMenuItem {
}
void onClick() {
click.run();
try {
click.run();
} catch (Throwable ex) {
Log.e(ex);
}
}
boolean onLongClick() {
if (longClick != null)
longClick.run();
return (longClick != null);
try {
if (longClick != null)
longClick.run();
return (longClick != null);
} catch (Throwable ex) {
Log.e(ex);
return false;
}
}
}