~anjan/lift

cd52391797ef479336de5d41ae753354de2cc297 — Anjandev Momi 4 years ago 9832b37
make edit workout invisible if done for today
M app/src/main/java/ca/momi/lift/LastWorkout.java => app/src/main/java/ca/momi/lift/LastWorkout.java +4 -0
@@ 28,6 28,7 @@ public class LastWorkout {
    public String program;
    public boolean onPause;
    public static final String onPausetxt = "On Pause";
    public String datestring;


    private int getIdxBeg(String searchTxt, String sub){


@@ 128,6 129,9 @@ public class LastWorkout {
        String[] lines = content.split("\n");
        onPause = lines[lines.length-1].contentEquals(onPausetxt);

        String dateLine = lines[1];
        datestring = dateLine.substring(dateLine.indexOf("<")+1,dateLine.indexOf(">"));

        List<String> routines = new AssignedExcers().routineDescriber;

        for (int i = 0; i < routines.size(); i++){

M app/src/main/java/ca/momi/lift/MainActivity.java => app/src/main/java/ca/momi/lift/MainActivity.java +5 -1
@@ 167,8 167,12 @@ public class MainActivity extends AppCompatActivity {
            }

            nextIdx = assExcersize.nextRoutineIdx(curIdx);
        }

            if (latestwork.datestring.equals(DateFormat.format("yyyy-MM-dd", new Date()).toString())) {
                // already done today's workout
                findViewById(R.id.edDate).setVisibility(View.INVISIBLE);
            }
        }

        RadioButton nextButton = (RadioButton) routinesRadGroup.getChildAt(nextIdx);
        nextButton.setChecked(true);