π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Sort AlbumFileEntry to process non-deleted entries first
Neeraj Guptaa2f1edb14b54
diff --git a/pkg/model/remote.go b/pkg/model/remote.goindex 52f97104e0..ed73268823 100644--- a/pkg/model/remote.go+++ b/pkg/model/remote.go@@ -3,6 +3,7 @@ package modelimport ("cli-go/pkg/model/export""fmt"+ "sort""time")@@ -53,6 +54,16 @@ type AlbumFileEntry struct {SyncedLocally bool `json:"localSync"`}+// Sort list of AlbumFileEntry by IsDeleted and then by albumID+func SortAlbumFileEntry(entries []*AlbumFileEntry) {+ sort.Slice(entries, func(i, j int) bool {+ if entries[i].IsDeleted != entries[j].IsDeleted {+ return !entries[i].IsDeleted && entries[j].IsDeleted+ }+ return entries[i].AlbumID < entries[j].AlbumID+ })+}+func (r *RemoteFile) GetFileType() FileType {value, ok := r.Metadata["fileType"]if !ok {