2023-08-25 06:18:06 +00:00
|
|
|
import "package:photos/core/configuration.dart";
|
2023-08-25 04:39:30 +00:00
|
|
|
import "package:photos/models/file/file.dart";
|
|
|
|
import "package:photos/models/file/file_type.dart";
|
2023-08-25 07:14:51 +00:00
|
|
|
import "package:photos/models/file/trash_file.dart";
|
2023-08-25 04:39:30 +00:00
|
|
|
|
|
|
|
extension FilePropsExtn on EnteFile {
|
|
|
|
bool get isLivePhoto => fileType == FileType.livePhoto;
|
|
|
|
|
|
|
|
bool get isMotionPhoto => pubMagicMetadata?.mvi != null;
|
|
|
|
|
|
|
|
bool get isLiveOrMotionPhoto => isLivePhoto || isMotionPhoto;
|
2023-08-25 05:27:39 +00:00
|
|
|
|
2023-08-25 06:18:06 +00:00
|
|
|
bool get isOwner =>
|
|
|
|
(ownerID == null) || (ownerID! == Configuration.instance.getUserID()!);
|
2023-08-25 05:27:39 +00:00
|
|
|
|
2023-08-25 06:18:06 +00:00
|
|
|
bool get canEditMetaInfo => isUploaded && isOwner;
|
2023-08-25 07:14:51 +00:00
|
|
|
|
|
|
|
bool get isTrash => this is TrashFile;
|
2023-08-25 04:39:30 +00:00
|
|
|
}
|