don’t throw error if location is not set

This commit is contained in:
Morten Delenk 2022-08-15 10:42:29 +01:00
parent df839b4c03
commit eefd8134c3
No known key found for this signature in database
GPG key ID: 5130416C797067B6

View file

@ -103,7 +103,8 @@ public class MapFragment extends FragmentBase<FragmentMapBinding> {
var map = this.getBinding().map;
map.getOverlays().clear();
this.subscribe(this.getClient().toObservable()
.flatMap(client -> client.streamObjects().toObservable()),
.flatMap(client -> client.streamObjects().toObservable())
.filter(item -> item.lastKnownLocation().isPresent()),
this::addMarker);
}