From c67a5a2c0edb3a894619c31212ba1d5254f0ace6 Mon Sep 17 00:00:00 2001 From: Carlos <2092019+CarlosEsco@users.noreply.github.com> Date: Sat, 23 May 2020 18:57:40 -0400 Subject: [PATCH] move coil package out of download package and into image (#445) move CoverViewImageTarget into coil package --- app/src/main/java/eu/kanade/tachiyomi/App.kt | 3 +-- .../data/{download => image}/coil/ByteArrayFetcher.kt | 2 +- .../tachiyomi/data/{download => image}/coil/CoilSetup.kt | 2 +- .../tachiyomi/{widget => data/image/coil}/CoverViewTarget.kt | 2 +- .../data/{download => image}/coil/LibraryMangaImageTarget.kt | 2 +- .../tachiyomi/data/{download => image}/coil/MangaFetcher.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt | 2 +- .../ui/migration/manga/process/MigrationProcessHolder.kt | 2 +- .../kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt | 2 +- .../eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt | 2 +- .../java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt | 2 +- .../tachiyomi/ui/source/browse/BrowseSourceGridHolder.kt | 2 +- .../tachiyomi/ui/source/browse/BrowseSourceListHolder.kt | 2 +- .../ui/source/global_search/GlobalSearchMangaHolder.kt | 2 +- 17 files changed, 17 insertions(+), 18 deletions(-) rename app/src/main/java/eu/kanade/tachiyomi/data/{download => image}/coil/ByteArrayFetcher.kt (93%) rename app/src/main/java/eu/kanade/tachiyomi/data/{download => image}/coil/CoilSetup.kt (96%) rename app/src/main/java/eu/kanade/tachiyomi/{widget => data/image/coil}/CoverViewTarget.kt (96%) rename app/src/main/java/eu/kanade/tachiyomi/data/{download => image}/coil/LibraryMangaImageTarget.kt (97%) rename app/src/main/java/eu/kanade/tachiyomi/data/{download => image}/coil/MangaFetcher.kt (99%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 5e16ff7807..80101cb81e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent import androidx.lifecycle.ProcessLifecycleOwner import androidx.multidex.MultiDex -import eu.kanade.tachiyomi.data.download.coil.CoilSetup +import eu.kanade.tachiyomi.data.image.coil.CoilSetup import eu.kanade.tachiyomi.data.notification.Notifications import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault @@ -19,7 +19,6 @@ import org.acra.annotation.ReportsCrashes import timber.log.Timber import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.InjektScope -import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.registry.default.DefaultRegistrar diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/ByteArrayFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/ByteArrayFetcher.kt similarity index 93% rename from app/src/main/java/eu/kanade/tachiyomi/data/download/coil/ByteArrayFetcher.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/image/coil/ByteArrayFetcher.kt index 6cdc4f5b72..b30de27c47 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/ByteArrayFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/ByteArrayFetcher.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.download.coil +package eu.kanade.tachiyomi.data.image.coil import coil.bitmappool.BitmapPool import coil.decode.DataSource diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/CoilSetup.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt similarity index 96% rename from app/src/main/java/eu/kanade/tachiyomi/data/download/coil/CoilSetup.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt index b6bdcb206e..f484b490bb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/CoilSetup.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoilSetup.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.download.coil +package eu.kanade.tachiyomi.data.image.coil import android.content.Context import android.os.Build diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/CoverViewTarget.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoverViewTarget.kt similarity index 96% rename from app/src/main/java/eu/kanade/tachiyomi/widget/CoverViewTarget.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoverViewTarget.kt index 49855e9db9..1e3841d4fd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/CoverViewTarget.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/CoverViewTarget.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.widget +package eu.kanade.tachiyomi.data.image.coil import android.graphics.drawable.Drawable import android.view.View diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/LibraryMangaImageTarget.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/LibraryMangaImageTarget.kt similarity index 97% rename from app/src/main/java/eu/kanade/tachiyomi/data/download/coil/LibraryMangaImageTarget.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/image/coil/LibraryMangaImageTarget.kt index a2e1841526..e364546acb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/LibraryMangaImageTarget.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/LibraryMangaImageTarget.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.download.coil +package eu.kanade.tachiyomi.data.image.coil import android.graphics.BitmapFactory import android.graphics.drawable.Drawable diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/MangaFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/MangaFetcher.kt similarity index 99% rename from app/src/main/java/eu/kanade/tachiyomi/data/download/coil/MangaFetcher.kt rename to app/src/main/java/eu/kanade/tachiyomi/data/image/coil/MangaFetcher.kt index d6aeb9fd50..dca14e12c3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/coil/MangaFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/image/coil/MangaFetcher.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.data.download.coil +package eu.kanade.tachiyomi.data.image.coil import android.webkit.MimeTypeMap import coil.bitmappool.BitmapPool diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt index 701af23e1d..4b8a5c2e57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt @@ -13,7 +13,7 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.system.LocaleHelper import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.view.resetStrokeColor -import eu.kanade.tachiyomi.widget.CoverViewTarget +import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import kotlinx.android.synthetic.main.extension_card_item.* import kotlinx.android.synthetic.main.source_global_search_controller_card_item.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt index 784cbaeb6a..b41a6c1ddf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt @@ -8,7 +8,7 @@ import coil.api.clear import coil.size.Precision import coil.size.Scale import eu.kanade.tachiyomi.data.database.models.Manga -import eu.kanade.tachiyomi.data.download.coil.loadLibraryManga +import eu.kanade.tachiyomi.data.image.coil.loadLibraryManga import eu.kanade.tachiyomi.util.view.gone import eu.kanade.tachiyomi.util.view.visibleIf import kotlinx.android.synthetic.main.manga_grid_item.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt index 556c12798c..3c350acd98 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt @@ -4,7 +4,7 @@ import android.view.View import android.view.ViewGroup import coil.api.clear import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.data.download.coil.loadLibraryManga +import eu.kanade.tachiyomi.data.image.coil.loadLibraryManga import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.view.gone import eu.kanade.tachiyomi.util.view.updateLayoutParams diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt index a339e4bb02..f3b116139d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/EditMangaDialog.kt @@ -11,7 +11,7 @@ import com.afollestad.materialdialogs.customview.customView import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.models.Manga -import eu.kanade.tachiyomi.data.download.coil.MangaFetcher +import eu.kanade.tachiyomi.data.image.coil.MangaFetcher import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.util.lang.chop diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt index 5fe5b1eaa3..8599955f03 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessHolder.kt @@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.util.view.invisible import eu.kanade.tachiyomi.util.view.setVectorCompat import eu.kanade.tachiyomi.util.view.visible import eu.kanade.tachiyomi.util.view.withFadeTransaction -import eu.kanade.tachiyomi.widget.CoverViewTarget +import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import kotlinx.android.synthetic.main.manga_grid_item.view.* import kotlinx.android.synthetic.main.migration_process_item.* import kotlinx.android.synthetic.main.unread_download_badge.view.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt index cf37b12c99..257fe77a50 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt @@ -6,7 +6,7 @@ import androidx.core.content.ContextCompat import coil.api.clear import coil.transform.CircleCropTransformation import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.data.download.coil.loadLibraryManga +import eu.kanade.tachiyomi.data.image.coil.loadLibraryManga import eu.kanade.tachiyomi.ui.manga.chapter.BaseChapterHolder import eu.kanade.tachiyomi.util.chapter.ChapterUtil import eu.kanade.tachiyomi.util.system.getResourceColor diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt index d8e1fd94c4..40cc050d93 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt @@ -4,7 +4,7 @@ import android.view.View import coil.api.clear import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.MangaChapterHistory -import eu.kanade.tachiyomi.data.download.coil.loadLibraryManga +import eu.kanade.tachiyomi.data.image.coil.loadLibraryManga import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.lang.toTimestampString import kotlinx.android.synthetic.main.recently_read_item.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt index 29910fba74..a5a8b0a876 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentMangaHolder.kt @@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.ui.recents import android.app.Activity import android.view.View import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.data.download.coil.loadLibraryManga +import eu.kanade.tachiyomi.data.image.coil.loadLibraryManga import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.ui.manga.chapter.BaseChapterHolder diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceGridHolder.kt index b8d5da170b..995579d5c7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceGridHolder.kt @@ -11,7 +11,7 @@ import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.ui.library.LibraryCategoryAdapter import eu.kanade.tachiyomi.util.view.gone -import eu.kanade.tachiyomi.widget.CoverViewTarget +import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import kotlinx.android.synthetic.main.manga_grid_item.* import kotlinx.android.synthetic.main.unread_download_badge.* diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceListHolder.kt index 9d309afafe..44ed67421c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/BrowseSourceListHolder.kt @@ -10,7 +10,7 @@ import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.system.getResourceColor -import eu.kanade.tachiyomi.widget.CoverViewTarget +import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import kotlinx.android.synthetic.main.manga_list_item.* /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchMangaHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchMangaHolder.kt index 94bf774fec..8fd27cdc91 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchMangaHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchMangaHolder.kt @@ -8,7 +8,7 @@ import coil.request.LoadRequest import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.view.visibleIf -import eu.kanade.tachiyomi.widget.CoverViewTarget +import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import kotlinx.android.synthetic.main.source_global_search_controller_card_item.* class GlobalSearchMangaHolder(view: View, adapter: GlobalSearchCardAdapter) :