handle cases where title is null for getDisplayName
This commit is contained in:
parent
d2d8cf5ed7
commit
3de66f782e
|
@ -1,3 +1,4 @@
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:photo_manager/photo_manager.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
|
@ -60,6 +61,8 @@ class File extends EnteFile {
|
|||
// in V2: LivePhoto hash is stored as imgHash:vidHash
|
||||
static const kCurrentMetadataVersion = 2;
|
||||
|
||||
static final _logger = Logger('File');
|
||||
|
||||
File();
|
||||
|
||||
static Future<File> fromAsset(String pathName, AssetEntity asset) async {
|
||||
|
@ -225,7 +228,8 @@ class File extends EnteFile {
|
|||
if (pubMagicMetadata != null && pubMagicMetadata!.editedName != null) {
|
||||
return pubMagicMetadata!.editedName!;
|
||||
}
|
||||
return title!;
|
||||
if (title == null) _logger.severe('File title is null');
|
||||
return title ?? '';
|
||||
}
|
||||
|
||||
// returns true if the file isn't available in the user's gallery
|
||||
|
|
Loading…
Reference in a new issue