From 478fb9598a3a8c19751fe96cf3a9baf982359b82 Mon Sep 17 00:00:00 2001 From: Hicham Boushaba Date: Fri, 15 Nov 2024 21:18:47 +0100 Subject: [PATCH] Fix detekt issues --- .../rest/wpapi/media/BaseWPV2MediaRestClient.kt | 12 ++++++++++-- .../wordpress/android/fluxc/store/MediaStore.java | 8 ++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/media/BaseWPV2MediaRestClient.kt b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/media/BaseWPV2MediaRestClient.kt index 788eb782f9..a20cabfb3a 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/media/BaseWPV2MediaRestClient.kt +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpapi/media/BaseWPV2MediaRestClient.kt @@ -11,7 +11,11 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.onCompletion import kotlinx.coroutines.flow.onStart -import okhttp3.* +import okhttp3.Call +import okhttp3.Callback +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Response import org.json.JSONException import org.json.JSONObject import org.wordpress.android.fluxc.Dispatcher @@ -24,7 +28,11 @@ import org.wordpress.android.fluxc.model.MediaModel.MediaUploadState.FAILED import org.wordpress.android.fluxc.model.SiteModel import org.wordpress.android.fluxc.network.rest.wpapi.WPAPIResponse import org.wordpress.android.fluxc.network.rest.wpcom.WPComGsonRequest -import org.wordpress.android.fluxc.store.MediaStore.* +import org.wordpress.android.fluxc.store.MediaStore.FetchMediaListResponsePayload +import org.wordpress.android.fluxc.store.MediaStore.MediaError +import org.wordpress.android.fluxc.store.MediaStore.MediaErrorType +import org.wordpress.android.fluxc.store.MediaStore.MediaPayload +import org.wordpress.android.fluxc.store.MediaStore.ProgressPayload import org.wordpress.android.fluxc.tools.CoroutineEngine import org.wordpress.android.fluxc.utils.MimeType import org.wordpress.android.util.AppLog diff --git a/fluxc/src/main/java/org/wordpress/android/fluxc/store/MediaStore.java b/fluxc/src/main/java/org/wordpress/android/fluxc/store/MediaStore.java index 1b16372a61..0a30de3179 100644 --- a/fluxc/src/main/java/org/wordpress/android/fluxc/store/MediaStore.java +++ b/fluxc/src/main/java/org/wordpress/android/fluxc/store/MediaStore.java @@ -1,12 +1,9 @@ package org.wordpress.android.fluxc.store; import android.text.TextUtils; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import com.wellsql.generated.MediaModelTable; - import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import org.wordpress.android.fluxc.Dispatcher; @@ -35,6 +32,8 @@ import org.wordpress.android.fluxc.utils.MimeType; import org.wordpress.android.util.AppLog; +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.net.ConnectException; import java.net.SocketTimeoutException; @@ -43,9 +42,6 @@ import java.util.List; import java.util.Locale; -import javax.inject.Inject; -import javax.inject.Singleton; - @Singleton public class MediaStore extends Store { public static final int DEFAULT_NUM_MEDIA_PER_FETCH = 50;