Skip to content

Commit

Permalink
Don't show empty charts
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisChristou committed Mar 26, 2023
1 parent 9983cdb commit ad8e8be
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 227 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public void updateSet(Integer finalI, Integer finalJ, Double reps, Double weight

// Let the user know I guess
runOnUiThread(() -> {
showSnackbarMessage("Set Updated!");
showSnackbarMessage("Set Updated");
updateTodaysExercises();
});

Expand Down Expand Up @@ -406,7 +406,7 @@ public void updateViewAndShowMessage()
{
runOnUiThread(()->{
updateTodaysExercises();
showSnackbarMessage("Set Added!");
showSnackbarMessage("Set Added");
});
}

Expand Down
10 changes: 10 additions & 0 deletions verifit/src/main/java/com/example/verifit/ui/ChartsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.ScrollView;

import com.example.verifit.R;
import com.github.mikephil.charting.animation.Easing;
Expand Down Expand Up @@ -64,6 +65,15 @@ public void onCreateStuff()
bottomNavigationView.setSelectedItemId(R.id.charts);
bottomNavigationView.setOnNavigationItemSelectedListener(this);

ScrollView scrollView = findViewById(R.id.scrollView);
if(MainActivity.dataStorage.getWorkoutDays().size() == 0){

scrollView.setVisibility(View.GONE);
}
else
{
scrollView.setVisibility(View.VISIBLE);
}

barChartVolumes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ else if(response.message().equals("Bad Gateway"))
if(message.equals("verifit_rs_login"))
{
SnackBarWithMessage snackBarWithMessage = new SnackBarWithMessage(MainActivity.this);
snackBarWithMessage.showSnackbar("Welcome back!");
snackBarWithMessage.showSnackbar("Welcome back");
}
else if(message.equals("verifit_rs_logout"))
{
Expand Down
Loading

0 comments on commit ad8e8be

Please sign in to comment.