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