From c6daaae9e63477d79c9048ae20ef49cdcfb039e9 Mon Sep 17 00:00:00 2001 From: LuftVerbot <97435834+LuftVerbot@users.noreply.github.com> Date: Tue, 30 May 2023 13:14:17 +0200 Subject: [PATCH] clean up --- .../data/download/anime/model/AnimeDownloadQueue.kt | 9 --------- .../data/download/manga/model/MangaDownload.kt | 1 - .../data/download/manga/model/MangaDownloadQueue.kt | 11 ----------- .../download/anime/AnimeDownloadQueueScreenModel.kt | 3 --- .../download/manga/MangaDownloadQueueScreenModel.kt | 3 --- .../eu/kanade/tachiyomi/network/OkHttpExtensions.kt | 3 --- 6 files changed, 30 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/anime/model/AnimeDownloadQueue.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/anime/model/AnimeDownloadQueue.kt index facb0724d..e175d1348 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/anime/model/AnimeDownloadQueue.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/anime/model/AnimeDownloadQueue.kt @@ -3,12 +3,8 @@ package eu.kanade.tachiyomi.data.download.anime.model import eu.kanade.core.util.asFlow import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.data.download.anime.AnimeDownloadStore -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.drop @@ -17,15 +13,10 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge import kotlinx.coroutines.flow.onStart -import kotlinx.coroutines.flow.receiveAsFlow -import kotlinx.coroutines.flow.shareIn import kotlinx.coroutines.flow.update -import rx.Observable import rx.subjects.PublishSubject -import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.domain.entries.anime.model.Anime import tachiyomi.domain.items.episode.model.Episode -import java.util.concurrent.CopyOnWriteArrayList class AnimeDownloadQueue( private val store: AnimeDownloadStore, diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownload.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownload.kt index 9ffd26a92..f227bbdeb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownload.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownload.kt @@ -13,7 +13,6 @@ import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emitAll import kotlinx.coroutines.flow.flow -import rx.subjects.PublishSubject import tachiyomi.domain.entries.manga.model.Manga import tachiyomi.domain.items.chapter.model.Chapter import uy.kohesive.injekt.Injekt diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownloadQueue.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownloadQueue.kt index 194317ec3..c37127ccd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownloadQueue.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/manga/model/MangaDownloadQueue.kt @@ -2,13 +2,8 @@ package eu.kanade.tachiyomi.data.download.manga.model import eu.kanade.core.util.asFlow import eu.kanade.tachiyomi.data.download.manga.MangaDownloadStore -import eu.kanade.tachiyomi.source.model.Page -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.drop @@ -17,15 +12,9 @@ import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge import kotlinx.coroutines.flow.onStart -import kotlinx.coroutines.flow.receiveAsFlow -import kotlinx.coroutines.flow.shareIn import kotlinx.coroutines.flow.update -import rx.Observable -import rx.subjects.PublishSubject -import tachiyomi.core.util.lang.launchNonCancellable import tachiyomi.domain.entries.manga.model.Manga import tachiyomi.domain.items.chapter.model.Chapter -import java.util.concurrent.CopyOnWriteArrayList class MangaDownloadQueue( private val store: MangaDownloadStore, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/anime/AnimeDownloadQueueScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/anime/AnimeDownloadQueueScreenModel.kt index 9db4e4fa0..72b79c5a5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/anime/AnimeDownloadQueueScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/anime/AnimeDownloadQueueScreenModel.kt @@ -12,12 +12,9 @@ import eu.kanade.tachiyomi.databinding.DownloadListBinding import kotlinx.coroutines.Job import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch -import logcat.LogPriority -import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/manga/MangaDownloadQueueScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/manga/MangaDownloadQueueScreenModel.kt index f5be1be8f..5d159b993 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/manga/MangaDownloadQueueScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/manga/MangaDownloadQueueScreenModel.kt @@ -14,7 +14,6 @@ import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.debounce @@ -22,8 +21,6 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch -import logcat.LogPriority -import tachiyomi.core.util.system.logcat import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt index 21c7c27b9..f651317dc 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt +++ b/core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt @@ -4,7 +4,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.KSerializer import kotlinx.serialization.json.Json import kotlinx.serialization.json.okio.decodeFromBufferedSource import kotlinx.serialization.serializer @@ -22,8 +21,6 @@ import uy.kohesive.injekt.api.get import java.io.IOException import java.util.concurrent.atomic.AtomicBoolean import kotlin.coroutines.resumeWithException -import kotlin.reflect.KType -import kotlin.reflect.typeOf val jsonMime = "application/json; charset=utf-8".toMediaType()