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

Commit c84530d3 authored by David A. Velasco's avatar David A. Velasco
Browse files

Added helper method to check if a server version supports remote thumbnails

parent 5d1f0690
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -444,9 +444,8 @@ public class OwnCloudClient extends HttpClient {
    }


    public void setOwnCloudVersion(String version){
        OwnCloudVersion ver = new OwnCloudVersion(version);
        mVersion = ver;
    public void setOwnCloudVersion(OwnCloudVersion version){
        mVersion = version;
    }

    public OwnCloudVersion getOwnCloudVersion(){
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {

    public static final int MINIMUM_VERSION_WITH_FORBIDDEN_CHARS = 0x08010000; // 8.1

    public static final int MINIMUM_SERVER_VERSION_FOR_REMOTE_THUMBNAILS = 0x07080000; // 7.8.0
    
    private static final int MAX_DOTS = 3;
    
    // format is in version
@@ -127,5 +129,7 @@ public class OwnCloudVersion implements Comparable<OwnCloudVersion> {
        return (mVersion >= MINIMUM_VERSION_WITH_FORBIDDEN_CHARS);
    }

    public boolean supportsRemoteThumbnails() { return (mVersion >= MINIMUM_SERVER_VERSION_FOR_REMOTE_THUMBNAILS); }
    
    
}