mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
fix issue with displaying tasks with broken markdown
This commit is contained in:
parent
668178c262
commit
a2dc7f4b9f
1 changed files with 10 additions and 2 deletions
|
|
@ -186,8 +186,16 @@ public abstract class BaseTasksRecyclerViewAdapter<VH extends BaseTaskViewHolder
|
|||
.queryList()))
|
||||
.flatMap(Observable::from)
|
||||
.map(task -> {
|
||||
task.parsedText = MarkdownParser.parseMarkdown(task.getText());
|
||||
task.parsedNotes = MarkdownParser.parseMarkdown(task.getNotes());
|
||||
try {
|
||||
task.parsedText = MarkdownParser.parseMarkdown(task.getText());
|
||||
} catch (NullPointerException e) {
|
||||
task.parsedText = task.getText();
|
||||
}
|
||||
try {
|
||||
task.parsedNotes = MarkdownParser.parseMarkdown(task.getNotes());
|
||||
} catch (NullPointerException e) {
|
||||
task.parsedNotes = task.getNotes();
|
||||
}
|
||||
return task;
|
||||
})
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
|
|
|||
Loading…
Reference in a new issue