small refactor, better dao thigns
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user