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

Commit f4849919 authored by David Luhmer's avatar David Luhmer Committed by David Luhmer
Browse files

Fix NetworkOnMainThreadException when using ResponseBody

parent 5b186351
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ public class NextcloudRetrofitServiceMethod<T> {

                // Streaming
                if(typeArgument == ResponseBody.class) {
                    return (T) Observable.just(Okhttp3Helper.getResponseBodyFromRequest(nextcloudAPI, request));
                    return (T) Observable.fromCallable(() -> Okhttp3Helper.getResponseBodyFromRequest(nextcloudAPI, request));
                } else if (typeArgument instanceof ParameterizedType) {
                    ParameterizedType innerType = (ParameterizedType) typeArgument;
                    Type innerOwnerType = innerType.getRawType();
+2 −2

File changed.

Contains only whitespace changes.