Skip to content

Commit

Permalink
Fixes for task rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed May 19, 2024
1 parent aa52e41 commit faf7cfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,9 @@ abstract class SettingsEntity
taskRoundToNearest == null ? null : taskRoundToNearest != 1;

bool get isTaskRoundingCustom =>
taskRoundToNearest == 0 ||
!kTaskRoundingOptions.values.contains(taskRoundToNearest);
taskRoundingEnabled == true &&
(taskRoundToNearest == 0 ||
!kTaskRoundingOptions.values.contains(taskRoundToNearest));

bool get hasAddress => address1 != null && address1!.isNotEmpty;

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/settings/task_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class _TaskSettingsState extends State<TaskSettings> {
viewModel.onSettingsChanged(settings.rebuild(
(b) => b
..taskRoundToNearest = value == true
? 60 * 5
? 60 * 15
: value == false
? 1
: null,
Expand Down

0 comments on commit faf7cfe

Please sign in to comment.