mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Rename ReadFilesystemOperation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
3330df3b66
commit
7f85a2f228
@ -45,7 +45,7 @@ import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||
import com.nextcloud.talk.components.filebrowser.models.BrowserFile;
|
||||
import com.nextcloud.talk.components.filebrowser.models.DavResponse;
|
||||
import com.nextcloud.talk.components.filebrowser.webdav.LegacyReadFilesystemOperation;
|
||||
import com.nextcloud.talk.components.filebrowser.webdav.ReadFilesystemOperation;
|
||||
import com.nextcloud.talk.databinding.ReactionsInsideMessageBinding;
|
||||
import com.nextcloud.talk.models.database.UserEntity;
|
||||
import com.nextcloud.talk.models.json.chat.ChatMessage;
|
||||
@ -289,20 +289,20 @@ public abstract class MagicPreviewMessageViewHolder extends MessageHolders.Incom
|
||||
}
|
||||
|
||||
private void fetchFileInformation(String url, UserEntity activeUser) {
|
||||
Single.fromCallable(new Callable<LegacyReadFilesystemOperation>() {
|
||||
Single.fromCallable(new Callable<ReadFilesystemOperation>() {
|
||||
@Override
|
||||
public LegacyReadFilesystemOperation call() {
|
||||
return new LegacyReadFilesystemOperation(okHttpClient, activeUser, url, 0);
|
||||
public ReadFilesystemOperation call() {
|
||||
return new ReadFilesystemOperation(okHttpClient, activeUser, url, 0);
|
||||
}
|
||||
}).observeOn(Schedulers.io())
|
||||
.subscribe(new SingleObserver<LegacyReadFilesystemOperation>() {
|
||||
.subscribe(new SingleObserver<ReadFilesystemOperation>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// unused atm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@NonNull LegacyReadFilesystemOperation readFilesystemOperation) {
|
||||
public void onSuccess(@NonNull ReadFilesystemOperation readFilesystemOperation) {
|
||||
DavResponse davResponse = readFilesystemOperation.readRemotePath();
|
||||
if (davResponse.data != null) {
|
||||
List<BrowserFile> browserFileList = (List<BrowserFile>) davResponse.data;
|
||||
|
@ -26,7 +26,7 @@ import android.util.Log;
|
||||
|
||||
import com.nextcloud.talk.components.filebrowser.interfaces.ListingInterface;
|
||||
import com.nextcloud.talk.components.filebrowser.models.DavResponse;
|
||||
import com.nextcloud.talk.components.filebrowser.webdav.LegacyReadFilesystemOperation;
|
||||
import com.nextcloud.talk.components.filebrowser.webdav.ReadFilesystemOperation;
|
||||
import com.nextcloud.talk.models.database.UserEntity;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
@ -50,20 +50,20 @@ public class DavListing extends ListingAbstractClass {
|
||||
|
||||
@Override
|
||||
public void getFiles(String path, UserEntity currentUser, @Nullable OkHttpClient okHttpClient) {
|
||||
Single.fromCallable(new Callable<LegacyReadFilesystemOperation>() {
|
||||
Single.fromCallable(new Callable<ReadFilesystemOperation>() {
|
||||
@Override
|
||||
public LegacyReadFilesystemOperation call() {
|
||||
return new LegacyReadFilesystemOperation(okHttpClient, currentUser, path, 1);
|
||||
public ReadFilesystemOperation call() {
|
||||
return new ReadFilesystemOperation(okHttpClient, currentUser, path, 1);
|
||||
}
|
||||
}).subscribeOn(Schedulers.io())
|
||||
.subscribe(new SingleObserver<LegacyReadFilesystemOperation>() {
|
||||
.subscribe(new SingleObserver<ReadFilesystemOperation>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@NonNull LegacyReadFilesystemOperation readFilesystemOperation) {
|
||||
public void onSuccess(@NonNull ReadFilesystemOperation readFilesystemOperation) {
|
||||
davResponse = readFilesystemOperation.readRemotePath();
|
||||
try {
|
||||
listingInterface.listingResult(davResponse);
|
||||
|
@ -40,15 +40,14 @@ import kotlin.jvm.functions.Function2;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@Deprecated
|
||||
public class LegacyReadFilesystemOperation {
|
||||
public class ReadFilesystemOperation {
|
||||
private static final String TAG = "ReadFilesystemOperation";
|
||||
private final OkHttpClient okHttpClient;
|
||||
private final String url;
|
||||
private final int depth;
|
||||
private final String basePath;
|
||||
|
||||
public LegacyReadFilesystemOperation(OkHttpClient okHttpClient, UserEntity currentUser, String path, int depth) {
|
||||
public ReadFilesystemOperation(OkHttpClient okHttpClient, UserEntity currentUser, String path, int depth) {
|
||||
OkHttpClient.Builder okHttpClientBuilder = okHttpClient.newBuilder();
|
||||
okHttpClientBuilder.followRedirects(false);
|
||||
okHttpClientBuilder.followSslRedirects(false);
|
||||
@ -92,7 +91,7 @@ public class LegacyReadFilesystemOperation {
|
||||
}
|
||||
});
|
||||
} catch (IOException | DavException e) {
|
||||
Log.w("", "Error reading remote path");
|
||||
Log.w(TAG, "Error reading remote path");
|
||||
}
|
||||
|
||||
remoteFiles.add(BrowserFile.Companion.getModelFromResponse(rootElement[0],
|
Loading…
Reference in New Issue
Block a user