Handle message file not readable (found)

This commit is contained in:
M66B
2018-12-14 08:59:51 +01:00
parent 3d1b983bca
commit 2d2d8968ea
2 changed files with 14 additions and 2 deletions

View File

@@ -98,7 +98,13 @@ public class ViewModelBrowse extends ViewModel {
boolean match = false;
String find = state.search.toLowerCase();
EntityMessage message = db.message().getMessage(state.messages.get(i));
String body = (message.content ? message.read(state.context) : null);
String body = null;
if (message.content)
try {
body = message.read(state.context);
} catch (IOException ex) {
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
}
if (message.from != null)
for (int j = 0; j < message.from.length && !match; j++)