record button was showing up on last tracks screen (fixes this hopefully)

This commit is contained in:
y20k 2018-10-06 00:22:09 +02:00
parent 309267e9f2
commit f746887e61
2 changed files with 5 additions and 5 deletions

View file

@ -596,22 +596,22 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys {
case FAB_STATE_DEFAULT:
mFloatingActionButtonMain.hide(); // workaround todo remove asap
mFloatingActionButtonMain.setImageResource(R.drawable.ic_fiber_manual_record_white_24dp);
mFloatingActionButtonMain.show(); // workaround todo remove asap
if (mSelectedTab == FRAGMENT_ID_MAP) mFloatingActionButtonMain.show(); // workaround todo remove asap
break;
case FAB_STATE_RECORDING:
mFloatingActionButtonMain.hide(); // workaround todo remove asap
mFloatingActionButtonMain.setImageResource(R.drawable.ic_fiber_manual_record_red_24dp);
mFloatingActionButtonMain.show(); // workaround todo remove asap
if (mSelectedTab == FRAGMENT_ID_MAP) mFloatingActionButtonMain.show(); // workaround todo remove asap
break;
case FAB_STATE_SAVE:
mFloatingActionButtonMain.hide(); // workaround todo remove asap
mFloatingActionButtonMain.setImageResource(R.drawable.ic_save_white_24dp);
mFloatingActionButtonMain.show(); // workaround todo remove asap
if (mSelectedTab == FRAGMENT_ID_MAP) mFloatingActionButtonMain.show(); // workaround todo remove asap
break;
default:
mFloatingActionButtonMain.hide(); // workaround todo remove asap
mFloatingActionButtonMain.setImageResource(R.drawable.ic_fiber_manual_record_white_24dp);
mFloatingActionButtonMain.show(); // workaround todo remove asap
if (mSelectedTab == FRAGMENT_ID_MAP) mFloatingActionButtonMain.show(); // workaround todo remove asap
break;
}
}

View file

@ -234,7 +234,7 @@ public class TrackerService extends Service implements TrackbookKeys, SensorEven
// load temp track file
mTrack = storageHelper.loadTrack(FILE_TEMP_TRACK);
// try to mark last waypoint as stopover
int lastWayPoint = mTrack.getWayPoints().size() - 1;
int lastWayPoint = mTrack.getSize() - 1;
if (lastWayPoint >= 0) {
mTrack.getWayPoints().get(lastWayPoint).setIsStopOver(true);
}