mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-17 19:42:04 +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()))
|
.queryList()))
|
||||||
.flatMap(Observable::from)
|
.flatMap(Observable::from)
|
||||||
.map(task -> {
|
.map(task -> {
|
||||||
task.parsedText = MarkdownParser.parseMarkdown(task.getText());
|
try {
|
||||||
task.parsedNotes = MarkdownParser.parseMarkdown(task.getNotes());
|
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;
|
return task;
|
||||||
})
|
})
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue