From 45b32844974fda76788b56690681b684c3d34c2e Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Mon, 20 Apr 2020 14:34:08 +0900 Subject: [PATCH] fixed overlay update after renaming --- lib/model/image_entry.dart | 2 +- lib/widgets/fullscreen/fullscreen_action_delegate.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/model/image_entry.dart b/lib/model/image_entry.dart index ae1ad8b62..e987b1e40 100644 --- a/lib/model/image_entry.dart +++ b/lib/model/image_entry.dart @@ -273,7 +273,7 @@ class ImageEntry { if (path is String) this.path = path; final contentId = newFields['contentId']; if (contentId is int) this.contentId = contentId; - final sourceTitle = newFields['sourceTitle']; + final sourceTitle = newFields['title']; if (sourceTitle is String) this.sourceTitle = sourceTitle; _bestTitle = null; metadataChangeNotifier.notifyListeners(); diff --git a/lib/widgets/fullscreen/fullscreen_action_delegate.dart b/lib/widgets/fullscreen/fullscreen_action_delegate.dart index 4176a2226..bd8c3448b 100644 --- a/lib/widgets/fullscreen/fullscreen_action_delegate.dart +++ b/lib/widgets/fullscreen/fullscreen_action_delegate.dart @@ -156,7 +156,7 @@ class FullscreenActionDelegate { } Future _showRenameDialog(BuildContext context, ImageEntry entry) async { - final currentName = entry.bestTitle; + final currentName = entry.filename ?? entry.sourceTitle; final controller = TextEditingController(text: currentName); final newName = await showDialog( context: context,