small refactor, better dao thigns

This commit is contained in:
Joshua Burman
2024-12-21 17:51:24 -05:00
parent 3153bf13f9
commit 1234a300e1
9 changed files with 152 additions and 182 deletions

View File

@ -30,12 +30,13 @@ class ActivityTimerModel with ChangeNotifier {
double get progress => _progress;
int get totalTime => _totalTime;
void setup(ActivityModel activityModel) {
void setup(ActivityModel activityModel, Activity activity) {
if (_activityModel == null || activityModel.id != _activityModel?.id) {
_periodicTimer?.cancel();
_progress = 0;
_isc = null;
_activityModel = activityModel;
_activity = activity;
_sets = activityModel.actions[0].items();
_currentActionNum = 0;
_currentSetNum = 0;