mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix live location updates for own locations
This commit is contained in:
@@ -83,6 +83,7 @@ public class MapActivity extends BaseActivity implements Observer {
|
||||
mapboxMap.easeCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds, 50), 1000);
|
||||
});
|
||||
|
||||
|
||||
mapboxMap.addOnMapClickListener(point -> {
|
||||
final PointF pixel = mapboxMap.getProjection().toScreenLocation(point);
|
||||
Log.d(TAG, "on item clicked.");
|
||||
|
||||
@@ -114,6 +114,7 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, GenerateIn
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
dcContext.eventCenter.addObserver(DC_EVENT_LOCATION_CHANGED, this);
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
@@ -340,17 +341,18 @@ public class MapDataManager implements DcEventCenter.DcEventDelegate, GenerateIn
|
||||
@Override
|
||||
public void handleEvent(int eventId, Object data1, Object data2) {
|
||||
Log.d(TAG, "updateEvent in MapDataManager called. eventId: " + eventId);
|
||||
int contactId = (Integer) data1;
|
||||
int contactId = ((Long) data1).intValue();
|
||||
if (contactMapSources.containsKey(contactId)) {
|
||||
//FIXME: ---------v this is wrong, but there's no other opportunity for now
|
||||
updateSource(chatIds[0], contactId);
|
||||
generateMissingInfoWindows(contactId);
|
||||
refreshSource(contactId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean runOnMain() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user