Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 93dc55c8 authored by Andy Scherzinger's avatar Andy Scherzinger Committed by GitHub
Browse files

Merge pull request #146 from nextcloud/trashbinNewEndpoint

Add localId to serverFileInterface for Trashbin
parents 2c7ac048 42d362d3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -67,6 +67,14 @@ public class FileVersion implements Parcelable, ServerFileInterface {
        return "";
    }

    /**
     * For file version this is the same as remoteId
     */
    @Override
    public String getLocalId() {
        return getRemoteId();
    }

    @Override
    public String getRemoteId() {
        return remoteId;
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ public interface ServerFileInterface {
    
    String getRemotePath();
    
    String getLocalId();
    
    String getRemoteId();
    
    boolean getIsFavorite();
+16 −3
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        return false;
    }

    @Override
    public String getRemotePath() {
        return remotePath;
    }
@@ -75,6 +76,7 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        this.fullRemotePath = fullRemotePath;
    }

    @Override
    public String getMimeType() {
        return mimeType;
    }
@@ -83,6 +85,7 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        this.mimeType = mimeType;
    }

    @Override
    public long getFileLength() {
        return length;
    }
@@ -91,6 +94,7 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        this.length = length;
    }

    @Override
    public String getRemoteId() {
        return remoteId;
    }
@@ -99,10 +103,19 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        this.remoteId = remoteId;
    }

    /**
     * For trashbin this is the same as remoteId
     */
    @Override
    public String getLocalId() {
        return getRemoteId();
    }
    
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public String getFileName() {
        return fileName;
    }
@@ -123,6 +136,7 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        return deletionTimestamp;
    }

    @Override
    public boolean isFolder() {
        return mimeType != null && mimeType.equals(DIRECTORY);
    }
@@ -153,7 +167,6 @@ public class TrashbinFile implements Parcelable, Serializable, ServerFileInterfa
        setOriginalLocation(we.getTrashbinOriginalLocation());
        setDeletionTimestamp(we.getTrashbinDeletionTimestamp());
        setRemoteId(we.remoteId());
        
    }

    /**