fix: refresh logic, etc.

This commit is contained in:
wangcongtao
2020-02-20 15:58:42 +08:00
parent b724415698
commit 0912ca32f1

View File

@@ -508,11 +508,13 @@ public class MogoServiceProvider implements IMogoModuleProvider,
notifyRefreshData( mLastAutoRefreshLocation, getQueryRadius(), mAutoRefreshCallback );
return;
}
mLastAutoRefreshLocation = point;
float distance = Utils.calculateLineDistance( mLastAutoRefreshLocation, new MogoLatLng( location.getLatitude(), location.getLongitude() ) );
float distance = Utils.calculateLineDistance( mLastAutoRefreshLocation, point );
if ( distance > mAutoRefreshStrategy.getDistance() ) {
mStatusManager.setUserInteractionStatus( ServiceConst.TYPE, true, true );
mUiController.moveToCenter( mLastAutoRefreshLocation );
mStatusManager.setUserInteractionStatus( ServiceConst.TYPE, true, false );
mUiController.recoverLockMode();
mStatusManager.setUserInteractionStatus( TAG, true, false );
mUiController.changeZoom( 16.0f );
mLastAutoRefreshLocation = point;
notifyRefreshData( mLastAutoRefreshLocation, getQueryRadius(), mAutoRefreshCallback );
}
}