File: Add devicePathID field

This commit is contained in:
Neeraj Gupta 2022-07-23 12:55:40 +05:30
parent 85998f4c47
commit 7a49c329ed
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -20,6 +20,10 @@ class File extends EnteFile {
int ownerID;
int collectionID;
String localID;
// devicePathID is usually only filled while showing just onDevice files.
// for on ente files, this information will be null.
String devicePathID;
String title;
String deviceFolder;
int creationTime;
@ -61,10 +65,15 @@ class File extends EnteFile {
File();
static File fromAsset(String pathName, AssetEntity asset) {
static File fromAsset(
String pathName,
AssetEntity asset, {
String devicePathID,
}) {
File file = File();
file.localID = asset.id;
file.title = asset.title;
file.devicePathID = devicePathID;
file.deviceFolder = pathName;
file.location = Location(asset.latitude, asset.longitude);
file.fileType = _fileTypeFromAsset(asset);