Skip to content

Offline gym log for Android. No account, no ads, no internet.

Add settings for rest-pause rest and the gym pass

InlitX7d61eb214065
diff --git a/lib/state/settings_state.dart b/lib/state/settings_state.dart
index 070411e..cb9b14a 100644
--- a/lib/state/settings_state.dart
+++ b/lib/state/settings_state.dart
@@ -23,6 +23,7 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
String heatmapRange = 'weeks';
String alarmStyle = 'quiet';
int restSeconds = 90;
+ int miniRestSeconds = 20;
String? alarmSound;
String? alarmSoundName;
@@ -40,8 +41,11 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
bool hideShots = false;
bool autoAdvance = true;
bool keepScreenOn = true;
+ bool blurOn = true;
+ bool lowEndAsked = false;
bool startCountdown = true;
bool gamification = true;
+ bool passOn = true;
bool logRpe = false;
String effortScale = 'rpe';
int? trainReminderMin;
@@ -254,6 +258,18 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
notifyListeners();
}
+ void togglePass() {
+ passOn = !passOn;
+ _persist();
+ notifyListeners();
+ }
+
+ void setMiniRest(int v) {
+ miniRestSeconds = v <= 0 ? 0 : v.clamp(5, 180);
+ _persist();
+ notifyListeners();
+ }
+
int restFor(String exerciseId) =>
exerciseRest[exerciseId] ?? (modeOf(exerciseId) == 'cardio' ? 0 : restSeconds);
@@ -357,6 +373,18 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
notifyListeners();
}
+ void setBlur(bool on) {
+ blurOn = on;
+ blurEffects = on;
+ _persist();
+ notifyListeners();
+ }
+
+ void markLowEndAsked() {
+ lowEndAsked = true;
+ _persist();
+ }
+
double? progressFor(String exerciseId) => progressStep[exerciseId];
bool hasProgress(String exerciseId) =>