Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed May 19, 2024
2 parents 9b3ab7a + 0a33858 commit 7b74d1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 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
27 changes: 17 additions & 10 deletions lib/ui/product/view/product_view_overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ class _ProductOverviewState extends State<ProductOverview> {
formatNumberType: FormatNumberType.int);
}

if (product.imageUrl.isNotEmpty) {
fields[localization.imageUrl] = product.imageUrl;
}

return ScrollableListView(
children: <Widget>[
EntityHeader(
Expand All @@ -127,13 +123,24 @@ class _ProductOverviewState extends State<ProductOverview> {
),
ListDivider(),
FieldGrid(fields),
Padding(
padding: EdgeInsets.all(20),
child: Text(
product.notes,
style: TextStyle(fontSize: 16),
if (product.notes.isNotEmpty)
Padding(
padding: EdgeInsets.only(left: 20, top: 20, right: 20),
child: Text(
product.notes,
style: TextStyle(fontSize: 16),
),
),
),
if (product.imageUrl.isNotEmpty)
Padding(
padding: EdgeInsets.only(left: 20, top: 20, right: 20),
child: Image.network(
product.imageUrl,
width: double.infinity,
fit: BoxFit.contain,
),
),
SizedBox(height: 20),
],
);
}
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 7b74d1b

Please sign in to comment.