mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fix live photo field usage
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
a923d577ba
commit
56a86538bc
4 changed files with 11 additions and 7 deletions
|
@ -511,7 +511,7 @@ public class FileDataStorageManager {
|
|||
cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
|
||||
cv.put(ProviderTableMeta.FILE_METADATA_SIZE, gson.toJson(file.getImageDimension()));
|
||||
cv.put(ProviderTableMeta.FILE_METADATA_GPS, gson.toJson(file.getGeoLocation()));
|
||||
cv.put(ProviderTableMeta.FILE_METADATA_LIVE_PHOTO, gson.toJson(file.getLivePhoto()));
|
||||
cv.put(ProviderTableMeta.FILE_METADATA_LIVE_PHOTO, file.getLivePhoto());
|
||||
|
||||
return cv;
|
||||
}
|
||||
|
|
|
@ -198,6 +198,7 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
|
|||
lockTimestamp = source.readLong();
|
||||
lockTimeout = source.readLong();
|
||||
lockToken = source.readString();
|
||||
livePhoto = source.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -241,13 +242,17 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
|
|||
dest.writeLong(lockTimestamp);
|
||||
dest.writeLong(lockTimeout);
|
||||
dest.writeString(lockToken);
|
||||
// TODO add live photo availability
|
||||
dest.writeString(livePhoto);
|
||||
}
|
||||
|
||||
public String getLivePhoto() {
|
||||
return livePhoto;
|
||||
}
|
||||
|
||||
public void setLivePhoto(String livePhoto) {
|
||||
this.livePhoto = livePhoto;
|
||||
}
|
||||
|
||||
public void setDecryptedRemotePath(String path) {
|
||||
decryptedRemotePath = path;
|
||||
}
|
||||
|
@ -528,7 +533,7 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
|
|||
lockTimestamp = 0;
|
||||
lockTimeout = 0;
|
||||
lockToken = null;
|
||||
|
||||
livePhoto = null;
|
||||
imageDimension = null;
|
||||
}
|
||||
|
||||
|
@ -919,10 +924,6 @@ public class OCFile implements Parcelable, Comparable<OCFile>, ServerFileInterfa
|
|||
this.note = note;
|
||||
}
|
||||
|
||||
public void setLivePhoto(String livePhoto) {
|
||||
this.livePhoto = livePhoto;
|
||||
}
|
||||
|
||||
public void setSharees(List<ShareeUser> sharees) {
|
||||
this.sharees = sharees;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ import java.util.Collections;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -393,6 +394,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
holder.getLivePhotoIndicator().setVisibility(isLivePhoto ? (View.VISIBLE) : (View.GONE));
|
||||
|
||||
// FIXME Interface segregation principle violation
|
||||
// 594c962d71b
|
||||
// Not needed for Grid mode unfortunately ListGridImageViewHolder interface used for List and Grid mode
|
||||
holder.getLivePhotoIndicatorSeparator().setVisibility(isLivePhoto ? (View.VISIBLE) : (View.GONE));
|
||||
}
|
||||
|
|
|
@ -260,6 +260,7 @@ public final class FileStorageUtils {
|
|||
file.setTags(new ArrayList<>(Arrays.asList(remote.getTags())));
|
||||
file.setImageDimension(remote.getImageDimension());
|
||||
file.setGeoLocation(remote.getGeoLocation());
|
||||
file.setLivePhoto(remote.getLivePhoto());
|
||||
|
||||
return file;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue