Fix adapter count

This commit is contained in:
PavelRatushny 2017-07-12 10:39:51 +03:00
parent d227e34b59
commit c64538acc5

View file

@ -365,7 +365,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
boolean hasPath = false; boolean hasPath = false;
if (getGpx() != null) { if (getGpx() != null) {
if (getGpx().showCurrentTrack && adapter.getCount() > 0) { if (getGpx().showCurrentTrack) {
hasPath = false; hasPath = false;
} else if (getGpx().tracks.size() > 0 || getGpx().routes.size() > 0) { } else if (getGpx().tracks.size() > 0 || getGpx().routes.size() > 0) {
hasPath = true; hasPath = true;
@ -427,7 +427,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
} }
if (hasPath) { if (hasPath) {
if (getGpx() != null && !getGpx().showCurrentTrack) { if (getGpx() != null && !getGpx().showCurrentTrack && adapter.getCount() > 0) {
prepareSplitIntervalAdapterData(); prepareSplitIntervalAdapterData();
setupSplitIntervalView(splitIntervalView); setupSplitIntervalView(splitIntervalView);
updateSplitIntervalView(splitIntervalView); updateSplitIntervalView(splitIntervalView);