Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
If reps mode is enabled don't show work time
Browse files Browse the repository at this point in the history
Signed-off-by: micrusa <[email protected]>
  • Loading branch information
micrusa committed May 5, 2020
1 parent b8badd1 commit 6653024
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
14 changes: 11 additions & 3 deletions app/src/main/java/me/micrusa/amaztimer/AmazTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,21 @@ private void setTexts(int iSets, int iWork, int iRest){
sets.setText(String.valueOf(iSets));
work.setText(utils.formatTime(iWork));
rest.setText(utils.formatTime(iRest));
//If reps mode is enabled dont show work time
if(new file(defValues.settingsFile, this.mView.getContext()).get(defValues.sRepsMode, defValues.defRepsMode)){
work.setText(this.mView.getResources().getString(R.string.repsmode));
}
}

private void setTimesTexts() {
file file = new file(defValues.timerFile, this);
sets.setText(String.valueOf(file.get(defValues.sSets, defValues.defSets)));
work.setText(utils.formatTime(file.get(defValues.sWork, defValues.defWorkTime)));
rest.setText(utils.formatTime(file.get(defValues.sRest, defValues.defRestTime)));
setTexts(file.get(defValues.sSets, defValues.defSets),
file.get(defValues.sWork, defValues.defWorkTime),
file.get(defValues.sRest, defValues.defRestTime));
//If reps mode is enabled dont show work time
if(new file(defValues.settingsFile, this).get(defValues.sRepsMode, defValues.defRepsMode)){
work.setText(getResources().getString(R.string.repsmode));
}
}

private void getSettings() {
Expand Down
14 changes: 11 additions & 3 deletions app/src/main/java/me/micrusa/amaztimer/widget.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,21 @@ private void setTexts(int iSets, int iWork, int iRest){
sets.setText(String.valueOf(iSets));
work.setText(utils.formatTime(iWork));
rest.setText(utils.formatTime(iRest));
//If reps mode is enabled dont show work time
if(new file(defValues.settingsFile, this.mView.getContext()).get(defValues.sRepsMode, defValues.defRepsMode)){
work.setText(this.mView.getResources().getString(R.string.repsmode));
}
}

private void setTimesTexts() {
file file = new file(defValues.timerFile, this.mView.getContext());
sets.setText(String.valueOf(file.get(defValues.sSets, defValues.defSets)));
work.setText(utils.formatTime(file.get(defValues.sWork, defValues.defWorkTime)));
rest.setText(utils.formatTime(file.get(defValues.sRest, defValues.defRestTime)));
setTexts(file.get(defValues.sSets, defValues.defSets),
file.get(defValues.sWork, defValues.defWorkTime),
file.get(defValues.sRest, defValues.defRestTime));
//If reps mode is enabled dont show work time
if(new file(defValues.settingsFile, this.mView.getContext()).get(defValues.sRepsMode, defValues.defRepsMode)){
work.setText(this.mView.getResources().getString(R.string.repsmode));
}
}

private void getSettings() {
Expand Down

0 comments on commit 6653024

Please sign in to comment.