Fix creating groups in background

This commit is contained in:
PavelRatushny 2017-11-13 13:14:21 +02:00
parent 5818d2369a
commit 2cf3c2c254
2 changed files with 19 additions and 19 deletions

View file

@ -888,16 +888,26 @@ public class MapMarkersHelper {
listeners.remove(l);
}
private void refreshMarker(MapMarker marker) {
for (MapMarkerChangedListener l : listeners) {
l.onMapMarkerChanged(marker);
}
private void refreshMarker(final MapMarker marker) {
ctx.runInUIThread(new Runnable() {
@Override
public void run() {
for (MapMarkerChangedListener l : listeners) {
l.onMapMarkerChanged(marker);
}
}
});
}
private void refreshMarkers() {
for (MapMarkerChangedListener l : listeners) {
l.onMapMarkersChanged();
}
ctx.runInUIThread(new Runnable() {
@Override
public void run() {
for (MapMarkerChangedListener l : listeners) {
l.onMapMarkersChanged();
}
}
});
}
public void refresh() {

View file

@ -265,21 +265,11 @@ public class MapMarkersHistoryFragment extends Fragment implements MapMarkersHel
@Override
public void onMapMarkerChanged(MapMarker mapMarker) {
app.runInUIThread(new Runnable() {
@Override
public void run() {
updateAdapter();
}
});
updateAdapter();
}
@Override
public void onMapMarkersChanged() {
app.runInUIThread(new Runnable() {
@Override
public void run() {
updateAdapter();
}
});
updateAdapter();
}
}