Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): first char miss in new description (#4697)

shenlongb117985f667f
diff --git a/mobile/lib/modules/asset_viewer/ui/description_input.dart b/mobile/lib/modules/asset_viewer/ui/description_input.dart
index cc459d4732..e00739faf8 100644
--- a/mobile/lib/modules/asset_viewer/ui/description_input.dart
+++ b/mobile/lib/modules/asset_viewer/ui/description_input.dart
@@ -31,7 +31,14 @@ class DescriptionInput extends HookConsumerWidget {
final owner = ref.watch(currentUserProvider);
final hasError = useState(false);
- controller.text = description;
+ useEffect(
+ () {
+ controller.text = description;
+ isTextEmpty.value = description.isEmpty;
+ return null;
+ },
+ [description],
+ );
submitDescription(String description) async {
hasError.value = false;