fixed overlay update after renaming

This commit is contained in:
Thibault Deckers 2020-04-20 14:34:08 +09:00
parent 114d12a797
commit 45b3284497
2 changed files with 2 additions and 2 deletions

View file

@ -273,7 +273,7 @@ class ImageEntry {
if (path is String) this.path = path; if (path is String) this.path = path;
final contentId = newFields['contentId']; final contentId = newFields['contentId'];
if (contentId is int) this.contentId = contentId; if (contentId is int) this.contentId = contentId;
final sourceTitle = newFields['sourceTitle']; final sourceTitle = newFields['title'];
if (sourceTitle is String) this.sourceTitle = sourceTitle; if (sourceTitle is String) this.sourceTitle = sourceTitle;
_bestTitle = null; _bestTitle = null;
metadataChangeNotifier.notifyListeners(); metadataChangeNotifier.notifyListeners();

View file

@ -156,7 +156,7 @@ class FullscreenActionDelegate {
} }
Future<void> _showRenameDialog(BuildContext context, ImageEntry entry) async { Future<void> _showRenameDialog(BuildContext context, ImageEntry entry) async {
final currentName = entry.bestTitle; final currentName = entry.filename ?? entry.sourceTitle;
final controller = TextEditingController(text: currentName); final controller = TextEditingController(text: currentName);
final newName = await showDialog<String>( final newName = await showDialog<String>(
context: context, context: context,