Explorar o código

bug fix + copy change

ashilkn %!s(int64=2) %!d(string=hai) anos
pai
achega
ed17f8e288
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      lib/ui/viewer/file/file_caption_widget.dart

+ 8 - 4
lib/ui/viewer/file/file_caption_widget.dart

@@ -47,9 +47,12 @@ class _FileCaptionWidgetState extends State<FileCaptionWidget> {
     final textTheme = getEnteTextTheme(context);
     final textTheme = getEnteTextTheme(context);
     final caption = widget.file.caption;
     final caption = widget.file.caption;
     return TextField(
     return TextField(
-      onEditingComplete: () {
+      onEditingComplete: () async {
         if (editedCaption != null) {
         if (editedCaption != null) {
-          editFileCaption(context, widget.file, editedCaption);
+          await editFileCaption(context, widget.file, editedCaption);
+          if (mounted) {
+            setState(() {});
+          }
         }
         }
         _focusNode.unfocus();
         _focusNode.unfocus();
       },
       },
@@ -65,8 +68,9 @@ class _FileCaptionWidgetState extends State<FileCaptionWidget> {
         focusedBorder: InputBorder.none,
         focusedBorder: InputBorder.none,
         filled: true,
         filled: true,
         fillColor: colorScheme.fillFaint,
         fillColor: colorScheme.fillFaint,
-        hintText:
-            caption == null || caption.isEmpty ? "Add a caption" : caption,
+        hintText: caption == null || caption.isEmpty
+            ? "Add a description..."
+            : caption,
         hintStyle: getEnteTextTheme(context)
         hintStyle: getEnteTextTheme(context)
             .small
             .small
             .copyWith(color: colorScheme.textMuted),
             .copyWith(color: colorScheme.textMuted),