Fix crash on missing location

pull/1994/head
Alex Baker 2 years ago
parent 55f33a3f75
commit 5452d578be

@ -88,6 +88,7 @@ class ChipProvider @Inject constructor(
}
if (task.hasLocation() && filter !is PlaceFilter && preferences.showPlaceChip) {
val location = task.getLocation()
if (location != null) {
FilterChip(
filter = PlaceFilter(location.place),
defaultIcon = R.drawable.ic_outline_place_24px,
@ -97,6 +98,7 @@ class ChipProvider @Inject constructor(
colorProvider = this::getColor,
)
}
}
if (!isSubtask && preferences.showListChip) {
if (!isNullOrEmpty(task.googleTaskList) && filter !is GtasksFilter) {
lists.getGoogleTaskList(task.googleTaskList)?.let { list ->

Loading…
Cancel
Save