forked from upstream-mirrors/OpenTracks
If the only listener is a new one (and since for optimization we keep its state as the global state), we want to reset the global state before loading points onto it.
This commit is contained in:
@@ -508,6 +508,10 @@ public class TrackDataHub {
|
||||
|
||||
// If this is the only listener we have registered, keep the state that we serve to it as
|
||||
// a reference for other future listeners.
|
||||
if (isOnlyListener && reloadAll) {
|
||||
resetState();
|
||||
}
|
||||
|
||||
notifyPointsUpdated(isOnlyListener,
|
||||
minPointId,
|
||||
previousNumPoints,
|
||||
|
||||
Reference in New Issue
Block a user