From 040a8bd1f29543bdd7fbc142d5974ac9785fe742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=BCllner?= <79001016+derkauzigekoala@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:17:02 +0100 Subject: [PATCH] Update lib/screens/manage_collection_screen.dart Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/screens/manage_collection_screen.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/screens/manage_collection_screen.dart b/lib/screens/manage_collection_screen.dart index 5119ce7..faa93b1 100644 --- a/lib/screens/manage_collection_screen.dart +++ b/lib/screens/manage_collection_screen.dart @@ -86,17 +86,21 @@ class _ManageCollectionScreenState extends State { if (result != true) return; + final trimmedDesc = descCtrl.text.trim(); + final String? description = + trimmedDesc.isEmpty ? null : trimmedDesc; + try { await CollectionService.update( collectionId: _collection.id, name: ctrl.text.trim(), - description: descCtrl.text.trim(), + description: description, ); setState(() { _collection = Collection( id: _collection.id, name: ctrl.text.trim(), - description: descCtrl.text.trim(), + description: description, ownerId: _collection.ownerId, createdAt: _collection.createdAt, role: _collection.role,