Skip to content

Commit 940f22b

Browse files
committed
Fix #245 and #234 by adding a no tag mention at the bottom of the properties modal
Add field in .arb file Remove preference import in edit view Add conditional Text if tag list is shorter than 1
1 parent cb10cb9 commit 940f22b

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

l10n/app_en.arb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"piwigoServer_emptyJSONobject": "Piwigo server did return an empty JSON object.",
4040

4141

42-
42+
"noTags": "No tags",
4343

4444
"coreDataStore_WarningTitle": "Warning",
4545
"coreDataStore_WarningMessage": "A serious application error occurred while Piwigo tried to read the data cache. A new cache has therefore been created.",

lib/components/modals/image_info_modal.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ class ImageInfoModal extends StatelessWidget {
9393
FormSection(
9494
title: appStrings.tags,
9595
titlePadding: const EdgeInsets.symmetric(horizontal: 8.0),
96-
child: Wrap(
96+
child: image.tags.length < 1 ? Align(child: Text(appStrings.noTags)) : Wrap(
9797
spacing: 8.0,
9898
children: List.generate(
9999
image.tags.length,
100-
(index) => PiwigoChip(
100+
(index) => PiwigoChip(
101101
label: image.tags[index].name,
102102
backgroundColor:
103-
Theme.of(context).chipTheme.backgroundColor,
103+
Theme.of(context).chipTheme.backgroundColor,
104104
foregroundColor:
105-
Theme.of(context).textTheme.bodyMedium?.color,
105+
Theme.of(context).textTheme.bodyMedium?.color,
106106
),
107107
),
108108
),

lib/views/image/edit_image_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'package:piwigo_ng/models/image_model.dart';
1212
import 'package:piwigo_ng/models/tag_model.dart';
1313
import 'package:piwigo_ng/network/api_error.dart';
1414
import 'package:piwigo_ng/network/images.dart';
15-
import 'package:piwigo_ng/services/preferences_service.dart';
1615
import 'package:piwigo_ng/utils/localizations.dart';
1716
import 'package:rounded_loading_button/rounded_loading_button.dart';
1817

0 commit comments

Comments
 (0)