From 3f01dd90bef5a5a5f0f44a51356994598fbbdb41 Mon Sep 17 00:00:00 2001 From: "Wei.He" Date: Fri, 1 Dec 2023 10:33:06 +0800 Subject: [PATCH 1/5] chore: Implement functionality of the network module --- .../core/network/PqNetworkDataSource.kt | 11 +++ .../core/network/di/FlavoredNetworkModule.kt | 19 +++++ .../picquest/core/network/di/NetworkModule.kt | 36 ++++++++++ .../core/network/model/NetworkSearchImages.kt | 70 +++++++++++++++++++ .../network/retrofit/RetrofitPqNetwork.kt | 56 +++++++++++++++ secrets.defaults.properties | 3 +- 6 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 core/network/src/main/java/com/wei/picquest/core/network/PqNetworkDataSource.kt create mode 100644 core/network/src/main/java/com/wei/picquest/core/network/di/FlavoredNetworkModule.kt create mode 100644 core/network/src/main/java/com/wei/picquest/core/network/di/NetworkModule.kt create mode 100644 core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt create mode 100644 core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt diff --git a/core/network/src/main/java/com/wei/picquest/core/network/PqNetworkDataSource.kt b/core/network/src/main/java/com/wei/picquest/core/network/PqNetworkDataSource.kt new file mode 100644 index 0000000..16dc2ff --- /dev/null +++ b/core/network/src/main/java/com/wei/picquest/core/network/PqNetworkDataSource.kt @@ -0,0 +1,11 @@ +package com.wei.picquest.core.network + +import com.wei.picquest.core.network.model.NetworkSearchImages + +/** + * Interface representing network calls to the PicQuest backend + */ +interface PqNetworkDataSource { + + suspend fun searchImages(query: String): NetworkSearchImages +} diff --git a/core/network/src/main/java/com/wei/picquest/core/network/di/FlavoredNetworkModule.kt b/core/network/src/main/java/com/wei/picquest/core/network/di/FlavoredNetworkModule.kt new file mode 100644 index 0000000..a0d5333 --- /dev/null +++ b/core/network/src/main/java/com/wei/picquest/core/network/di/FlavoredNetworkModule.kt @@ -0,0 +1,19 @@ +package com.wei.picquest.core.network.di + +import com.wei.picquest.core.network.PqNetworkDataSource +import com.wei.picquest.core.network.retrofit.RetrofitPqNetwork +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent + +/** + * TODO Wei 移動至 build variants 下產出資料夾 + */ +@Module +@InstallIn(SingletonComponent::class) +interface FlavoredNetworkModule { + + @Binds + fun binds(implementation: RetrofitPqNetwork): PqNetworkDataSource +} diff --git a/core/network/src/main/java/com/wei/picquest/core/network/di/NetworkModule.kt b/core/network/src/main/java/com/wei/picquest/core/network/di/NetworkModule.kt new file mode 100644 index 0000000..57ec455 --- /dev/null +++ b/core/network/src/main/java/com/wei/picquest/core/network/di/NetworkModule.kt @@ -0,0 +1,36 @@ +package com.wei.picquest.core.network.di + +import com.wei.core.network.BuildConfig +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import kotlinx.serialization.json.Json +import okhttp3.Call +import okhttp3.OkHttpClient +import okhttp3.logging.HttpLoggingInterceptor +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object NetworkModule { + + @Provides + @Singleton + fun providesNetworkJson(): Json = Json { + ignoreUnknownKeys = true + } + + @Provides + @Singleton + fun okHttpCallFactory(): Call.Factory = OkHttpClient.Builder() + .addInterceptor( + HttpLoggingInterceptor() + .apply { + if (BuildConfig.DEBUG) { + setLevel(HttpLoggingInterceptor.Level.BODY) + } + }, + ) + .build() +} diff --git a/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt new file mode 100644 index 0000000..188d83a --- /dev/null +++ b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt @@ -0,0 +1,70 @@ +package com.wei.picquest.core.network.model + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * Network representation of [SearchImages] when fetched from / + */ +@Serializable +data class NetworkSearchImages( + @SerialName("total") + val total: Int, + @SerialName("totalHits") + val totalHits: Int, + @SerialName("hits") + val hits: List +) + +@Serializable +data class NetworkImageDetail( + @SerialName("id") + val id: Int, + @SerialName("pageURL") + val pageURL: String, + @SerialName("type") + val type: String, + @SerialName("tags") + val tags: String, + @SerialName("previewURL") + val previewURL: String, + @SerialName("previewWidth") + val previewWidth: Int, + @SerialName("previewHeight") + val previewHeight: Int, + @SerialName("webformatURL") + val webformatURL: String, + @SerialName("webformatWidth") + val webformatWidth: Int, + @SerialName("webformatHeight") + val webformatHeight: Int, + @SerialName("largeImageURL") + val largeImageURL: String, + @SerialName("fullHDURL") + val fullHDURL: String, + @SerialName("imageURL") + val imageURL: String, + @SerialName("imageWidth") + val imageWidth: Int, + @SerialName("imageHeight") + val imageHeight: Int, + @SerialName("imageSize") + val imageSize: Long, + @SerialName("views") + val views: Int, + @SerialName("downloads") + val downloads: Int, + @SerialName("likes") + val likes: Int, + @SerialName("comments") + val comments: Int, + @SerialName("user_id") + val userId: Int, + @SerialName("user") + val user: String, + @SerialName("userImageURL") + val userImageURL: String + // Add vectorURL if your account has full API access + // @SerialName("vectorURL") + // val vectorURL: String? = null +) \ No newline at end of file diff --git a/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt b/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt new file mode 100644 index 0000000..4e6cf77 --- /dev/null +++ b/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt @@ -0,0 +1,56 @@ +package com.wei.picquest.core.network.retrofit + +import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory +import com.wei.core.network.BuildConfig +import com.wei.picquest.core.network.PqNetworkDataSource +import com.wei.picquest.core.network.model.NetworkSearchImages +import kotlinx.serialization.json.Json +import okhttp3.Call +import okhttp3.MediaType.Companion.toMediaType +import retrofit2.Retrofit +import retrofit2.http.GET +import retrofit2.http.Query +import javax.inject.Inject +import javax.inject.Singleton + +private const val PIXABAY_BASE_URL = BuildConfig.BACKEND_URL +private const val API_KEY = BuildConfig.API_KEY + +/** + * Retrofit API declaration for Pixabay Network API + */ +interface RetrofitPixabayApi { + /** + * https://pixabay.com/api/?key=${api key}&q=yellow+flowers&image_type=photo + */ + @GET("") + suspend fun searchImages( + @Query("key") apiKey: String = API_KEY, + @Query("q") query: String, + @Query("image_type") imageType: String = "photo", + // Add more parameters as needed + ): NetworkSearchImages +} + +/** + * [Retrofit] backed [PqNetworkDataSource] + */ +@Singleton +class RetrofitPqNetwork @Inject constructor( + networkJson: Json, + okhttpCallFactory: Call.Factory, +) : PqNetworkDataSource { + + private val pixabayApi = Retrofit.Builder() + .baseUrl(PIXABAY_BASE_URL) + .callFactory(okhttpCallFactory) + .addConverterFactory( + networkJson.asConverterFactory("application/json".toMediaType()), + ) + .build() + .create(RetrofitPixabayApi::class.java) + + override suspend fun searchImages(query: String): NetworkSearchImages { + return pixabayApi.searchImages(query = query) + } +} diff --git a/secrets.defaults.properties b/secrets.defaults.properties index a7f254e..a8f4b44 100644 --- a/secrets.defaults.properties +++ b/secrets.defaults.properties @@ -1,4 +1,5 @@ ## This file provides default values to modules using the secrets-gradle-plugin. It is necessary # because the secrets properties file is not under source control so CI builds will fail without # default values. -BACKEND_URL="https://pixabay.com/api/" \ No newline at end of file +BACKEND_URL="https://pixabay.com/api/" +API_KEY="fake_api_key" \ No newline at end of file From 50d7bd61c1b801c8f018ed80411621ff7ac0151c Mon Sep 17 00:00:00 2001 From: "Wei.He" Date: Fri, 1 Dec 2023 11:01:43 +0800 Subject: [PATCH 2/5] chore: Implement functionality of the data module --- .../picquest/core/data/model/SearchImages.kt | 67 +++++++++++++++++++ .../DefaultSearchImagesRepository.kt | 37 ++++++++++ .../data/repository/SearchImagesRepository.kt | 10 +++ 3 files changed, 114 insertions(+) create mode 100644 core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt create mode 100644 core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt create mode 100644 core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt diff --git a/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt new file mode 100644 index 0000000..14603cc --- /dev/null +++ b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt @@ -0,0 +1,67 @@ +package com.wei.picquest.core.data.model + +import com.wei.picquest.core.network.model.NetworkSearchImages + +data class SearchImages( + val total: Int, + val totalHits: Int, + val images: List +) + +data class ImageDetail( + val id: Int, + val pageURL: String, + val type: String, + val tags: String, + val previewURL: String, + val previewWidth: Int, + val previewHeight: Int, + val webformatURL: String, + val webformatWidth: Int, + val webformatHeight: Int, + val largeImageURL: String, + val fullHDURL: String, + val imageURL: String, + val imageWidth: Int, + val imageHeight: Int, + val imageSize: Long, + val views: Int, + val downloads: Int, + val likes: Int, + val comments: Int, + val userId: Int, + val user: String, + val userImageURL: String +) + +fun NetworkSearchImages.asExternalModel() = SearchImages( + total = this.total, + totalHits = this.totalHits, + images = this.hits.map { networkImageDetail -> + ImageDetail( + id = networkImageDetail.id, + pageURL = networkImageDetail.pageURL, + type = networkImageDetail.type, + tags = networkImageDetail.tags, + previewURL = networkImageDetail.previewURL, + previewWidth = networkImageDetail.previewWidth, + previewHeight = networkImageDetail.previewHeight, + webformatURL = networkImageDetail.webformatURL, + webformatWidth = networkImageDetail.webformatWidth, + webformatHeight = networkImageDetail.webformatHeight, + largeImageURL = networkImageDetail.largeImageURL, + fullHDURL = networkImageDetail.fullHDURL, + imageURL = networkImageDetail.imageURL, + imageWidth = networkImageDetail.imageWidth, + imageHeight = networkImageDetail.imageHeight, + imageSize = networkImageDetail.imageSize, + views = networkImageDetail.views, + downloads = networkImageDetail.downloads, + likes = networkImageDetail.likes, + comments = networkImageDetail.comments, + userId = networkImageDetail.userId, + user = networkImageDetail.user, + userImageURL = networkImageDetail.userImageURL + ) + } +) diff --git a/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt b/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt new file mode 100644 index 0000000..e9ea205 --- /dev/null +++ b/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt @@ -0,0 +1,37 @@ +package com.wei.picquest.core.data.repository + +import com.wei.picquest.core.network.Dispatcher +import com.wei.picquest.core.network.PqDispatchers +import com.wei.picquest.core.network.PqNetworkDataSource +import com.wei.picquest.core.network.model.NetworkSearchImages +import kotlinx.coroutines.CoroutineDispatcher +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.withContext +import java.io.PrintWriter +import javax.inject.Inject + + +/** + * Implementation of the [SearchImagesRepository]. + * @param ioDispatcher 用於執行 IO 相關操作的 CoroutineDispatcher。 + * @param network 數據源的網路接口。 + */ +class DefaultSearchImagesRepository @Inject constructor( + @Dispatcher(PqDispatchers.IO) private val ioDispatcher: CoroutineDispatcher, + private val network: PqNetworkDataSource, +) : SearchImagesRepository { + + /** + * @param query。A URL encoded search term. If omitted, all images are returned. This value may not exceed 100 characters. + * Example: "yellow+flower" + * @return 一個 Flow,內容為 Search Images 的數據。 + */ + override suspend fun getSearchImages( + query: String + ): Flow = withContext(ioDispatcher) { + flow { + emit(network.searchImages(query)) + } + } +} \ No newline at end of file diff --git a/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt b/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt new file mode 100644 index 0000000..45a2856 --- /dev/null +++ b/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt @@ -0,0 +1,10 @@ +package com.wei.picquest.core.data.repository + +import com.wei.picquest.core.network.model.NetworkSearchImages +import kotlinx.coroutines.flow.Flow + + +interface SearchImagesRepository { + + suspend fun getSearchImages(query: String): Flow +} From c1d0174e6e45ab27956946b6ff34e71edecb67da Mon Sep 17 00:00:00 2001 From: "Wei.He" Date: Fri, 1 Dec 2023 11:12:38 +0800 Subject: [PATCH 3/5] fix(ci): spotlessCheck issues --- .../java/com/wei/picquest/core/data/model/SearchImages.kt | 8 ++++---- .../core/data/repository/DefaultSearchImagesRepository.kt | 6 ++---- .../core/data/repository/SearchImagesRepository.kt | 1 - .../picquest/core/network/model/NetworkSearchImages.kt | 6 +++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt index 14603cc..3b02933 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt @@ -5,7 +5,7 @@ import com.wei.picquest.core.network.model.NetworkSearchImages data class SearchImages( val total: Int, val totalHits: Int, - val images: List + val images: List, ) data class ImageDetail( @@ -31,7 +31,7 @@ data class ImageDetail( val comments: Int, val userId: Int, val user: String, - val userImageURL: String + val userImageURL: String, ) fun NetworkSearchImages.asExternalModel() = SearchImages( @@ -61,7 +61,7 @@ fun NetworkSearchImages.asExternalModel() = SearchImages( comments = networkImageDetail.comments, userId = networkImageDetail.userId, user = networkImageDetail.user, - userImageURL = networkImageDetail.userImageURL + userImageURL = networkImageDetail.userImageURL, ) - } + }, ) diff --git a/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt b/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt index e9ea205..f20cfdf 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/repository/DefaultSearchImagesRepository.kt @@ -8,10 +8,8 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import kotlinx.coroutines.withContext -import java.io.PrintWriter import javax.inject.Inject - /** * Implementation of the [SearchImagesRepository]. * @param ioDispatcher 用於執行 IO 相關操作的 CoroutineDispatcher。 @@ -28,10 +26,10 @@ class DefaultSearchImagesRepository @Inject constructor( * @return 一個 Flow,內容為 Search Images 的數據。 */ override suspend fun getSearchImages( - query: String + query: String, ): Flow = withContext(ioDispatcher) { flow { emit(network.searchImages(query)) } } -} \ No newline at end of file +} diff --git a/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt b/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt index 45a2856..5e1a293 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/repository/SearchImagesRepository.kt @@ -3,7 +3,6 @@ package com.wei.picquest.core.data.repository import com.wei.picquest.core.network.model.NetworkSearchImages import kotlinx.coroutines.flow.Flow - interface SearchImagesRepository { suspend fun getSearchImages(query: String): Flow diff --git a/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt index 188d83a..4eac48d 100644 --- a/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt +++ b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt @@ -13,7 +13,7 @@ data class NetworkSearchImages( @SerialName("totalHits") val totalHits: Int, @SerialName("hits") - val hits: List + val hits: List, ) @Serializable @@ -63,8 +63,8 @@ data class NetworkImageDetail( @SerialName("user") val user: String, @SerialName("userImageURL") - val userImageURL: String + val userImageURL: String, // Add vectorURL if your account has full API access // @SerialName("vectorURL") // val vectorURL: String? = null -) \ No newline at end of file +) From 955a2b017920d7359bfef7806d237b96e17994b3 Mon Sep 17 00:00:00 2001 From: "Wei.He" Date: Fri, 1 Dec 2023 13:29:19 +0800 Subject: [PATCH 4/5] fix: Corrected Pixabay API URL --- .../main/java/com/wei/picquest/core/data/di/DataModule.kt | 8 ++++++++ .../java/com/wei/picquest/core/data/model/SearchImages.kt | 4 ---- .../picquest/core/network/model/NetworkSearchImages.kt | 7 ------- .../picquest/core/network/retrofit/RetrofitPqNetwork.kt | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt b/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt index f1dec62..ee5a755 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt @@ -1,5 +1,7 @@ package com.wei.picquest.core.data.di +import com.wei.picquest.core.data.repository.DefaultSearchImagesRepository +import com.wei.picquest.core.data.repository.SearchImagesRepository import com.wei.picquest.core.data.utils.ConnectivityManagerNetworkMonitor import com.wei.picquest.core.data.utils.NetworkMonitor import dagger.Binds @@ -11,6 +13,12 @@ import dagger.hilt.components.SingletonComponent @InstallIn(SingletonComponent::class) interface DataModule { + @Binds + fun bindsSearchImagesRepository( + searchImagesRepository: DefaultSearchImagesRepository, + ): SearchImagesRepository + + @Binds fun bindsNetworkMonitor( networkMonitor: ConnectivityManagerNetworkMonitor, diff --git a/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt index 3b02933..df45fee 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/model/SearchImages.kt @@ -20,8 +20,6 @@ data class ImageDetail( val webformatWidth: Int, val webformatHeight: Int, val largeImageURL: String, - val fullHDURL: String, - val imageURL: String, val imageWidth: Int, val imageHeight: Int, val imageSize: Long, @@ -50,8 +48,6 @@ fun NetworkSearchImages.asExternalModel() = SearchImages( webformatWidth = networkImageDetail.webformatWidth, webformatHeight = networkImageDetail.webformatHeight, largeImageURL = networkImageDetail.largeImageURL, - fullHDURL = networkImageDetail.fullHDURL, - imageURL = networkImageDetail.imageURL, imageWidth = networkImageDetail.imageWidth, imageHeight = networkImageDetail.imageHeight, imageSize = networkImageDetail.imageSize, diff --git a/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt index 4eac48d..3394a5b 100644 --- a/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt +++ b/core/network/src/main/java/com/wei/picquest/core/network/model/NetworkSearchImages.kt @@ -40,10 +40,6 @@ data class NetworkImageDetail( val webformatHeight: Int, @SerialName("largeImageURL") val largeImageURL: String, - @SerialName("fullHDURL") - val fullHDURL: String, - @SerialName("imageURL") - val imageURL: String, @SerialName("imageWidth") val imageWidth: Int, @SerialName("imageHeight") @@ -64,7 +60,4 @@ data class NetworkImageDetail( val user: String, @SerialName("userImageURL") val userImageURL: String, - // Add vectorURL if your account has full API access - // @SerialName("vectorURL") - // val vectorURL: String? = null ) diff --git a/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt b/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt index 4e6cf77..e18a633 100644 --- a/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt +++ b/core/network/src/main/java/com/wei/picquest/core/network/retrofit/RetrofitPqNetwork.kt @@ -23,7 +23,7 @@ interface RetrofitPixabayApi { /** * https://pixabay.com/api/?key=${api key}&q=yellow+flowers&image_type=photo */ - @GET("") + @GET(".") suspend fun searchImages( @Query("key") apiKey: String = API_KEY, @Query("q") query: String, From 2cb844d115e94d377a274bb76103a9fd73e591e8 Mon Sep 17 00:00:00 2001 From: "Wei.He" Date: Fri, 1 Dec 2023 13:32:38 +0800 Subject: [PATCH 5/5] fix: spotlessCheck issues --- .../src/main/java/com/wei/picquest/core/data/di/DataModule.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt b/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt index ee5a755..130ee9f 100644 --- a/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt +++ b/core/data/src/main/java/com/wei/picquest/core/data/di/DataModule.kt @@ -18,7 +18,6 @@ interface DataModule { searchImagesRepository: DefaultSearchImagesRepository, ): SearchImagesRepository - @Binds fun bindsNetworkMonitor( networkMonitor: ConnectivityManagerNetworkMonitor,