mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
2dc413a553
commit
2d56506cbb
@ -184,9 +184,6 @@ dependencies {
|
|||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||||
androidTestImplementation "androidx.work:work-testing:${workVersion}"
|
androidTestImplementation "androidx.work:work-testing:${workVersion}"
|
||||||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||||
implementation ('com.gitlab.bitfireAT:dav4jvm:2.1.3', {
|
|
||||||
exclude group: 'org.ogce', module: 'xpp3' // Android comes with its own XmlPullParser
|
|
||||||
})
|
|
||||||
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
||||||
|
|
||||||
implementation "androidx.camera:camera-core:${androidxCameraVersion}"
|
implementation "androidx.camera:camera-core:${androidxCameraVersion}"
|
||||||
@ -312,7 +309,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'com.github.nextcloud-deps:android-talk-webrtc:110.5481.0'
|
implementation 'com.github.nextcloud-deps:android-talk-webrtc:110.5481.0'
|
||||||
|
|
||||||
implementation("com.github.nextcloud:android-library:$androidLibraryVersion") {
|
api("com.github.nextcloud:android-library:$androidLibraryVersion") {
|
||||||
exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
|
exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class ReadFilesystemOperationIT {
|
|||||||
this.username = username
|
this.username = username
|
||||||
token = password
|
token = password
|
||||||
}
|
}
|
||||||
val sut = ReadFilesystemOperation(client, user, "", 1)
|
val sut = ReadFilesystemOperation(client, user, "/", 1)
|
||||||
val data = sut.readRemotePath().data as List<BrowserFile>
|
val data = sut.readRemotePath().data as List<BrowserFile>
|
||||||
assertEquals(1, data.size)
|
assertEquals(1, data.size)
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ data class BrowserFile(
|
|||||||
browserFile.modifiedTimestamp = property.lastModified
|
browserFile.modifiedTimestamp = property.lastModified
|
||||||
}
|
}
|
||||||
is GetContentType -> {
|
is GetContentType -> {
|
||||||
browserFile.mimeType = property.type
|
browserFile.mimeType = property.type?.toString()
|
||||||
}
|
}
|
||||||
is OCSize -> {
|
is OCSize -> {
|
||||||
browserFile.size = property.ocSize
|
browserFile.size = property.ocSize
|
||||||
|
@ -36,11 +36,11 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import at.bitfire.dav4jvm.DavResource;
|
import at.bitfire.dav4jvm.DavResource;
|
||||||
|
import at.bitfire.dav4jvm.MultiResponseCallback;
|
||||||
import at.bitfire.dav4jvm.Response;
|
import at.bitfire.dav4jvm.Response;
|
||||||
import at.bitfire.dav4jvm.exception.DavException;
|
import at.bitfire.dav4jvm.exception.DavException;
|
||||||
import kotlin.Unit;
|
|
||||||
import kotlin.jvm.functions.Function2;
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
|
|
||||||
@ -77,10 +77,11 @@ public class ReadFilesystemOperation {
|
|||||||
final List<RemoteFile> remoteFiles = new ArrayList<>();
|
final List<RemoteFile> remoteFiles = new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
new DavResource(okHttpClient, HttpUrl.parse(url)).propfind(depth, WebdavUtils.getAllPropertiesList(),
|
new DavResource(okHttpClient, HttpUrl.parse(url)).propfind(depth,
|
||||||
new Function2<Response, Response.HrefRelation, Unit>() {
|
WebdavUtils.getAllPropertiesList(),
|
||||||
|
new MultiResponseCallback() {
|
||||||
@Override
|
@Override
|
||||||
public Unit invoke(Response response, Response.HrefRelation hrefRelation) {
|
public void onResponse(@NonNull Response response, @NonNull Response.HrefRelation hrefRelation) {
|
||||||
davResponse.setResponse(response);
|
davResponse.setResponse(response);
|
||||||
switch (hrefRelation) {
|
switch (hrefRelation) {
|
||||||
case MEMBER:
|
case MEMBER:
|
||||||
@ -92,7 +93,6 @@ public class ReadFilesystemOperation {
|
|||||||
case OTHER:
|
case OTHER:
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
return Unit.INSTANCE;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (IOException | DavException e) {
|
} catch (IOException | DavException e) {
|
||||||
|
@ -151,7 +151,7 @@ class ReadFolderListingOperation(okHttpClient: OkHttpClient, currentUser: User,
|
|||||||
remoteFileBrowserItem.modifiedTimestamp = property.lastModified
|
remoteFileBrowserItem.modifiedTimestamp = property.lastModified
|
||||||
}
|
}
|
||||||
is GetContentType -> {
|
is GetContentType -> {
|
||||||
remoteFileBrowserItem.mimeType = property.type
|
remoteFileBrowserItem.mimeType = property.type?.toString()
|
||||||
}
|
}
|
||||||
is OCSize -> {
|
is OCSize -> {
|
||||||
remoteFileBrowserItem.size = property.ocSize
|
remoteFileBrowserItem.size = property.ocSize
|
||||||
|
@ -368,7 +368,7 @@ class ChunkedFileUploader(
|
|||||||
remoteFileBrowserItem.modifiedTimestamp = property.lastModified
|
remoteFileBrowserItem.modifiedTimestamp = property.lastModified
|
||||||
}
|
}
|
||||||
is GetContentType -> {
|
is GetContentType -> {
|
||||||
remoteFileBrowserItem.mimeType = property.type
|
remoteFileBrowserItem.mimeType = property.type?.toString()
|
||||||
}
|
}
|
||||||
is OCSize -> {
|
is OCSize -> {
|
||||||
remoteFileBrowserItem.size = property.ocSize
|
remoteFileBrowserItem.size = property.ocSize
|
||||||
|
Loading…
Reference in New Issue
Block a user