Automatic Lint

This commit is contained in:
Syer10
2022-07-01 18:54:05 +00:00
parent 2c9ca5000c
commit e0304da584
8 changed files with 5 additions and 13 deletions

View File

@@ -7,10 +7,8 @@
package ca.gosyer.jui.domain.backup.interactor
import ca.gosyer.jui.domain.backup.service.BackupRepository
import ca.gosyer.jui.domain.category.service.CategoryRepository
import io.ktor.client.request.HttpRequestBuilder
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.singleOrNull
import me.tatarka.inject.annotations.Inject
import okio.Path

View File

@@ -8,7 +8,6 @@ package ca.gosyer.jui.domain.chapter.interactor
import ca.gosyer.jui.domain.chapter.service.ChapterRepository
import ca.gosyer.jui.domain.manga.model.Manga
import ca.gosyer.jui.domain.manga.service.MangaRepository
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.singleOrNull
import me.tatarka.inject.annotations.Inject

View File

@@ -11,7 +11,6 @@ import ca.gosyer.jui.domain.chapter.service.ChapterRepository
import ca.gosyer.jui.domain.manga.model.Manga
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.singleOrNull
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging

View File

@@ -7,7 +7,6 @@
package ca.gosyer.jui.domain.download.interactor
import ca.gosyer.jui.domain.download.service.DownloadRepository
import ca.gosyer.jui.domain.updates.service.UpdatesRepository
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import me.tatarka.inject.annotations.Inject

View File

@@ -10,7 +10,6 @@ import ca.gosyer.jui.domain.extension.model.Extension
import ca.gosyer.jui.domain.extension.service.ExtensionRepository
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.singleOrNull
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging

View File

@@ -7,9 +7,7 @@
package ca.gosyer.jui.domain.settings.interactor
import ca.gosyer.jui.domain.settings.service.SettingsRepository
import ca.gosyer.jui.domain.updates.service.UpdatesRepository
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.singleOrNull
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging

View File

@@ -64,10 +64,10 @@ class TachideskPageLoader(
log.debug { "Loading page ${page.index}" }
if (page.status.value == ReaderPage.Status.QUEUE) {
getChapterPage.asFlow(chapter.chapter, page.index) {
onDownload { bytesSentTotal, contentLength ->
page.progress.value = (bytesSentTotal.toFloat() / contentLength).coerceAtMost(1.0F)
}
onDownload { bytesSentTotal, contentLength ->
page.progress.value = (bytesSentTotal.toFloat() / contentLength).coerceAtMost(1.0F)
}
}
.onEach {
page.bitmap.value = it.toImageBitmap()
page.status.value = ReaderPage.Status.READY

View File

@@ -130,7 +130,7 @@ class UpdatesScreenViewModel @Inject constructor(
.firstNotNullOfOrNull { (_, chapters) ->
chapters.find {
it.chapter.mangaId == chapter.mangaId &&
it.chapter.index == chapter.index
it.chapter.index == chapter.index
}
}
?.deleteDownload(deleteChapterDownload)
@@ -143,7 +143,7 @@ class UpdatesScreenViewModel @Inject constructor(
.firstNotNullOfOrNull { (_, chapters) ->
chapters.find {
it.chapter.mangaId == chapter.mangaId &&
it.chapter.index == chapter.index
it.chapter.index == chapter.index
}
}
?.stopDownloading(stopChapterDownload)