From af4c2b8b30bc7ffcd978ad913424ea1849b1a9c5 Mon Sep 17 00:00:00 2001 From: Zsolt Bertalan Date: Thu, 24 Oct 2024 23:25:41 +0100 Subject: [PATCH] Reference #6, move Search classes to new mapping with RemoteDataSource --- .idea/codeStyles/Project.xml | 1 + .../flickslate/MockSearchRepositoryModule.kt | 3 +- .../data/network/model/MovieDetailsDto.kt | 4 +- .../search/data/SearchDataModule.kt | 32 ++++++++++ .../search/data/api/GenreDataSource.kt | 32 ++++++++++ .../search/data/api/GenreMoviesDataSource.kt | 29 ++++++++++ .../flickslate/search/data/db/GenreDao.kt | 16 +++-- .../search/data/db/GenreDataSource.kt | 20 ------- .../search/data/db/GenreMoviesDao.kt | 3 +- .../search/data/db/GenreMoviesDataSource.kt | 18 ------ .../search/data/db/SearchDatabaseModule.kt | 18 ------ .../network/GenreMoviesRemoteDataSource.kt | 27 +++++++++ .../data/network/GenreRemoteDataSource.kt | 26 +++++++++ .../search/data/network/SearchService.kt | 2 +- .../search/data/network/model/GenreDto.kt | 3 +- .../data/network/model/GenreReplyDto.kt | 13 ++++- .../search/domain/api/GenreRepository.kt | 6 +- .../search/repository/GenreAccessor.kt | 58 +++++++------------ .../search/ui/main/SearchViewModel.kt | 2 +- .../data/getresult/fetchCacheThenNetwork.kt | 2 + .../shared/domain/model/GenresReply.kt | 9 +++ .../shared/domain/model/PageData.kt | 3 + .../shared/domain/model/PagingReply.kt | 2 +- .../flickslate/shared/util/Response.kt | 4 +- .../flickslate/tv/data/network/TvService.kt | 1 - .../data/network/model/TopRatedTvReplyDto.kt | 6 +- .../tv/data/network/model/TvDetailsDto.kt | 4 +- 27 files changed, 225 insertions(+), 119 deletions(-) create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/SearchDataModule.kt create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/api/GenreDataSource.kt create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/api/GenreMoviesDataSource.kt delete mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/db/GenreDataSource.kt delete mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/db/GenreMoviesDataSource.kt delete mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/db/SearchDatabaseModule.kt create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/network/GenreMoviesRemoteDataSource.kt create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/search/data/network/GenreRemoteDataSource.kt create mode 100644 app/src/main/java/com/zsoltbertalan/flickslate/shared/domain/model/GenresReply.kt diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 07b96be..4768317 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -119,6 +119,7 @@