mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-28 16:22:12 -07:00
Fix #25 also for deleting workouts
This commit is contained in:
parent
4f22a6f500
commit
7fec3ef250
@ -47,7 +47,6 @@ public class ListWorkoutsActivity extends Activity implements WorkoutAdapter.Wor
|
|||||||
private RecyclerView.LayoutManager layoutManager;
|
private RecyclerView.LayoutManager layoutManager;
|
||||||
private FloatingActionMenu menu;
|
private FloatingActionMenu menu;
|
||||||
Workout[] workouts;
|
Workout[] workouts;
|
||||||
private boolean recorderHasStarted= false;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -101,18 +100,16 @@ public class ListWorkoutsActivity extends Activity implements WorkoutAdapter.Wor
|
|||||||
RecordWorkoutActivity.ACTIVITY= activity;
|
RecordWorkoutActivity.ACTIVITY= activity;
|
||||||
final Intent intent= new Intent(this, RecordWorkoutActivity.class);
|
final Intent intent= new Intent(this, RecordWorkoutActivity.class);
|
||||||
new Handler().postDelayed(() -> startActivity(intent), 300);
|
new Handler().postDelayed(() -> startActivity(intent), 300);
|
||||||
|
|
||||||
recorderHasStarted= true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
int count= workouts.length;
|
||||||
loadData();
|
loadData();
|
||||||
if(recorderHasStarted){
|
if(count != workouts.length){
|
||||||
refreshAdapter();
|
refreshAdapter();
|
||||||
recorderHasStarted= false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user