From ae7df4fb7fa4fc996ba26a9f6dbbb6b5277a939b Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 10 May 2022 17:54:52 -0400 Subject: [PATCH] Update linter --- .../eu/kanade/data/AndroidDatabaseHandler.kt | 12 ++++---- .../java/eu/kanade/data/DatabaseHandler.kt | 8 +++--- .../java/eu/kanade/data/TransactionContext.kt | 8 +++--- .../eu/kanade/data/history/HistoryMapper.kt | 4 +-- .../data/history/HistoryRepositoryImpl.kt | 4 +-- .../kanade/data/manga/MangaRepositoryImpl.kt | 2 +- .../eu/kanade/data/source/SourceMapper.kt | 2 +- .../data/source/SourceRepositoryImpl.kt | 2 +- .../eu/kanade/domain/chapter/model/Chapter.kt | 2 +- .../history/interactor/DeleteHistoryTable.kt | 2 +- .../domain/history/interactor/GetHistory.kt | 4 +-- .../interactor/GetNextChapterForManga.kt | 2 +- .../history/interactor/RemoveHistoryById.kt | 2 +- .../interactor/RemoveHistoryByMangaId.kt | 2 +- .../eu/kanade/domain/history/model/History.kt | 2 +- .../history/model/HistoryWithRelations.kt | 2 +- .../interactor/GetFavoritesBySourceId.kt | 2 +- .../eu/kanade/domain/manga/model/Manga.kt | 2 +- .../interactor/GetLanguagesWithSources.kt | 8 +++--- .../interactor/GetSourcesWithFavoriteCount.kt | 6 ++-- .../source/interactor/SetMigrateSorting.kt | 2 +- .../source/interactor/ToggleLanguage.kt | 2 +- .../domain/source/interactor/ToggleSource.kt | 2 +- .../source/interactor/ToggleSourcePin.kt | 2 +- .../eu/kanade/domain/source/model/Source.kt | 2 +- .../presentation/components/EmptyScreen.kt | 2 +- .../presentation/components/MangaCover.kt | 2 +- .../presentation/components/Preferences.kt | 4 +-- .../presentation/history/HistoryScreen.kt | 20 ++++++------- .../manga/components/BaseMangaListItem.kt | 6 ++-- .../eu/kanade/presentation/more/LogoHeader.kt | 2 +- .../presentation/source/MigrateMangaScreen.kt | 10 +++---- .../source/MigrateSourceScreen.kt | 6 ++-- .../presentation/source/SourceFilterScreen.kt | 16 +++++------ .../presentation/source/SourceScreen.kt | 28 +++++++++---------- .../source/components/BaseSourceItem.kt | 10 +++---- .../java/eu/kanade/tachiyomi/AppModule.kt | 8 +++--- .../tachiyomi/data/database/DbOpenCallback.kt | 2 +- .../manga/MigrationMangaController.kt | 2 +- .../manga/MigrationMangaPresenter.kt | 2 +- .../migration/search/SearchController.kt | 2 +- .../sources/MigrationSourcesController.kt | 10 ++++--- .../sources/MigrationSourcesPresenter.kt | 2 +- .../ui/browse/source/SourceFilterPresenter.kt | 4 +-- .../ui/browse/source/SourcePresenter.kt | 2 +- .../util/chapter/ChapterSourceSync.kt | 2 +- .../widget/TachiyomiBottomNavigationView.kt | 2 +- .../preference/ThemesPreferenceAdapter.kt | 2 +- gradle/libs.versions.toml | 2 +- 49 files changed, 119 insertions(+), 117 deletions(-) diff --git a/app/src/main/java/eu/kanade/data/AndroidDatabaseHandler.kt b/app/src/main/java/eu/kanade/data/AndroidDatabaseHandler.kt index bd4d99fde..fe579888f 100644 --- a/app/src/main/java/eu/kanade/data/AndroidDatabaseHandler.kt +++ b/app/src/main/java/eu/kanade/data/AndroidDatabaseHandler.kt @@ -19,7 +19,7 @@ class AndroidDatabaseHandler( val db: Database, private val driver: SqlDriver, val queryDispatcher: CoroutineDispatcher = Dispatchers.IO, - val transactionDispatcher: CoroutineDispatcher = queryDispatcher + val transactionDispatcher: CoroutineDispatcher = queryDispatcher, ) : DatabaseHandler { val suspendingTransactionId = ThreadLocal() @@ -30,21 +30,21 @@ class AndroidDatabaseHandler( override suspend fun awaitList( inTransaction: Boolean, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): List { return dispatch(inTransaction) { block(db).executeAsList() } } override suspend fun awaitOne( inTransaction: Boolean, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): T { return dispatch(inTransaction) { block(db).executeAsOne() } } override suspend fun awaitOneOrNull( inTransaction: Boolean, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): T? { return dispatch(inTransaction) { block(db).executeAsOneOrNull() } } @@ -64,7 +64,7 @@ class AndroidDatabaseHandler( override fun subscribeToPagingSource( countQuery: Database.() -> Query, transacter: Database.() -> Transacter, - queryProvider: Database.(Long, Long) -> Query + queryProvider: Database.(Long, Long) -> Query, ): PagingSource { return QueryPagingSource( countQuery = countQuery(db), @@ -72,7 +72,7 @@ class AndroidDatabaseHandler( dispatcher = queryDispatcher, queryProvider = { limit, offset -> queryProvider.invoke(db, limit, offset) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/data/DatabaseHandler.kt b/app/src/main/java/eu/kanade/data/DatabaseHandler.kt index a528b7010..c0cb676be 100644 --- a/app/src/main/java/eu/kanade/data/DatabaseHandler.kt +++ b/app/src/main/java/eu/kanade/data/DatabaseHandler.kt @@ -12,17 +12,17 @@ interface DatabaseHandler { suspend fun awaitList( inTransaction: Boolean = false, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): List suspend fun awaitOne( inTransaction: Boolean = false, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): T suspend fun awaitOneOrNull( inTransaction: Boolean = false, - block: suspend Database.() -> Query + block: suspend Database.() -> Query, ): T? fun subscribeToList(block: Database.() -> Query): Flow> @@ -34,6 +34,6 @@ interface DatabaseHandler { fun subscribeToPagingSource( countQuery: Database.() -> Query, transacter: Database.() -> Transacter, - queryProvider: Database.(Long, Long) -> Query + queryProvider: Database.(Long, Long) -> Query, ): PagingSource } diff --git a/app/src/main/java/eu/kanade/data/TransactionContext.kt b/app/src/main/java/eu/kanade/data/TransactionContext.kt index 156b4cdba..828a5fc17 100644 --- a/app/src/main/java/eu/kanade/data/TransactionContext.kt +++ b/app/src/main/java/eu/kanade/data/TransactionContext.kt @@ -95,7 +95,7 @@ private suspend fun AndroidDatabaseHandler.createTransactionContext(): Coroutine * thread by cancelling the job. */ private suspend fun CoroutineDispatcher.acquireTransactionThread( - controlJob: Job + controlJob: Job, ): ContinuationInterceptor { return suspendCancellableCoroutine { continuation -> continuation.invokeOnCancellation { @@ -116,8 +116,8 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread( // Couldn't acquire a thread, cancel coroutine. continuation.cancel( IllegalStateException( - "Unable to acquire a thread to perform the database transaction.", ex - ) + "Unable to acquire a thread to perform the database transaction.", ex, + ), ) } } @@ -128,7 +128,7 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread( */ private class TransactionElement( private val transactionThreadControlJob: Job, - val transactionDispatcher: ContinuationInterceptor + val transactionDispatcher: ContinuationInterceptor, ) : CoroutineContext.Element { companion object Key : CoroutineContext.Key diff --git a/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt b/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt index e7ebf5cb4..c4b7d4b31 100644 --- a/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt +++ b/app/src/main/java/eu/kanade/data/history/HistoryMapper.kt @@ -13,7 +13,7 @@ val historyMapper: (Long, Long, Date?, Date?) -> History = { id, chapterId, read } val historyWithRelationsMapper: (Long, Long, Long, String, String?, Float, Date?) -> HistoryWithRelations = { - historyId, mangaId, chapterId, title, thumbnailUrl, chapterNumber, readAt -> + historyId, mangaId, chapterId, title, thumbnailUrl, chapterNumber, readAt -> HistoryWithRelations( id = historyId, chapterId = chapterId, @@ -21,6 +21,6 @@ val historyWithRelationsMapper: (Long, Long, Long, String, String?, Float, Date? title = title, thumbnailUrl = thumbnailUrl ?: "", chapterNumber = chapterNumber, - readAt = readAt + readAt = readAt, ) } diff --git a/app/src/main/java/eu/kanade/data/history/HistoryRepositoryImpl.kt b/app/src/main/java/eu/kanade/data/history/HistoryRepositoryImpl.kt index 15d2d2633..19aaa8f29 100644 --- a/app/src/main/java/eu/kanade/data/history/HistoryRepositoryImpl.kt +++ b/app/src/main/java/eu/kanade/data/history/HistoryRepositoryImpl.kt @@ -11,7 +11,7 @@ import eu.kanade.domain.manga.model.Manga import eu.kanade.tachiyomi.util.system.logcat class HistoryRepositoryImpl( - private val handler: DatabaseHandler + private val handler: DatabaseHandler, ) : HistoryRepository { override fun getHistory(query: String): PagingSource { @@ -20,7 +20,7 @@ class HistoryRepositoryImpl( transacter = { historyViewQueries }, queryProvider = { limit, offset -> historyViewQueries.history(query, limit, offset, historyWithRelationsMapper) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/data/manga/MangaRepositoryImpl.kt b/app/src/main/java/eu/kanade/data/manga/MangaRepositoryImpl.kt index 137d2ec0d..11c67db77 100644 --- a/app/src/main/java/eu/kanade/data/manga/MangaRepositoryImpl.kt +++ b/app/src/main/java/eu/kanade/data/manga/MangaRepositoryImpl.kt @@ -6,7 +6,7 @@ import eu.kanade.domain.manga.repository.MangaRepository import kotlinx.coroutines.flow.Flow class MangaRepositoryImpl( - private val databaseHandler: DatabaseHandler + private val databaseHandler: DatabaseHandler, ) : MangaRepository { override fun getFavoritesBySourceId(sourceId: Long): Flow> { diff --git a/app/src/main/java/eu/kanade/data/source/SourceMapper.kt b/app/src/main/java/eu/kanade/data/source/SourceMapper.kt index ed4fd7f50..e03e1c854 100644 --- a/app/src/main/java/eu/kanade/data/source/SourceMapper.kt +++ b/app/src/main/java/eu/kanade/data/source/SourceMapper.kt @@ -8,7 +8,7 @@ val sourceMapper: (eu.kanade.tachiyomi.source.Source) -> Source = { source -> source.id, source.lang, source.name, - false + false, ) } diff --git a/app/src/main/java/eu/kanade/data/source/SourceRepositoryImpl.kt b/app/src/main/java/eu/kanade/data/source/SourceRepositoryImpl.kt index 1dddc01e1..4db18e633 100644 --- a/app/src/main/java/eu/kanade/data/source/SourceRepositoryImpl.kt +++ b/app/src/main/java/eu/kanade/data/source/SourceRepositoryImpl.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.map class SourceRepositoryImpl( private val sourceManager: SourceManager, - private val handler: DatabaseHandler + private val handler: DatabaseHandler, ) : SourceRepository { override fun getSources(): Flow> { diff --git a/app/src/main/java/eu/kanade/domain/chapter/model/Chapter.kt b/app/src/main/java/eu/kanade/domain/chapter/model/Chapter.kt index 6eff7c580..27ed9a46f 100644 --- a/app/src/main/java/eu/kanade/domain/chapter/model/Chapter.kt +++ b/app/src/main/java/eu/kanade/domain/chapter/model/Chapter.kt @@ -12,5 +12,5 @@ data class Chapter( val name: String, val dateUpload: Long, val chapterNumber: Float, - val scanlator: String? + val scanlator: String?, ) diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/DeleteHistoryTable.kt b/app/src/main/java/eu/kanade/domain/history/interactor/DeleteHistoryTable.kt index bebf1209d..a8e10cbf5 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/DeleteHistoryTable.kt +++ b/app/src/main/java/eu/kanade/domain/history/interactor/DeleteHistoryTable.kt @@ -3,7 +3,7 @@ package eu.kanade.domain.history.interactor import eu.kanade.domain.history.repository.HistoryRepository class DeleteHistoryTable( - private val repository: HistoryRepository + private val repository: HistoryRepository, ) { suspend fun await(): Boolean { diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt b/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt index d2f8302b7..1db219ed3 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt +++ b/app/src/main/java/eu/kanade/domain/history/interactor/GetHistory.kt @@ -8,12 +8,12 @@ import eu.kanade.domain.history.repository.HistoryRepository import kotlinx.coroutines.flow.Flow class GetHistory( - private val repository: HistoryRepository + private val repository: HistoryRepository, ) { fun subscribe(query: String): Flow> { return Pager( - PagingConfig(pageSize = 25) + PagingConfig(pageSize = 25), ) { repository.getHistory(query) }.flow diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/GetNextChapterForManga.kt b/app/src/main/java/eu/kanade/domain/history/interactor/GetNextChapterForManga.kt index 477408ca3..4ed35a347 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/GetNextChapterForManga.kt +++ b/app/src/main/java/eu/kanade/domain/history/interactor/GetNextChapterForManga.kt @@ -4,7 +4,7 @@ import eu.kanade.domain.chapter.model.Chapter import eu.kanade.domain.history.repository.HistoryRepository class GetNextChapterForManga( - private val repository: HistoryRepository + private val repository: HistoryRepository, ) { suspend fun await(mangaId: Long, chapterId: Long): Chapter? { diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryById.kt b/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryById.kt index 93012c266..4eb15568c 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryById.kt +++ b/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryById.kt @@ -4,7 +4,7 @@ import eu.kanade.domain.history.model.HistoryWithRelations import eu.kanade.domain.history.repository.HistoryRepository class RemoveHistoryById( - private val repository: HistoryRepository + private val repository: HistoryRepository, ) { suspend fun await(history: HistoryWithRelations) { diff --git a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryByMangaId.kt b/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryByMangaId.kt index f32fa5f7b..4c3558456 100644 --- a/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryByMangaId.kt +++ b/app/src/main/java/eu/kanade/domain/history/interactor/RemoveHistoryByMangaId.kt @@ -3,7 +3,7 @@ package eu.kanade.domain.history.interactor import eu.kanade.domain.history.repository.HistoryRepository class RemoveHistoryByMangaId( - private val repository: HistoryRepository + private val repository: HistoryRepository, ) { suspend fun await(mangaId: Long) { diff --git a/app/src/main/java/eu/kanade/domain/history/model/History.kt b/app/src/main/java/eu/kanade/domain/history/model/History.kt index 58c1c985e..5c42c9852 100644 --- a/app/src/main/java/eu/kanade/domain/history/model/History.kt +++ b/app/src/main/java/eu/kanade/domain/history/model/History.kt @@ -5,5 +5,5 @@ import java.util.Date data class History( val id: Long?, val chapterId: Long, - val readAt: Date? + val readAt: Date?, ) diff --git a/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt b/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt index 6f5a8e1fc..827cfda54 100644 --- a/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt +++ b/app/src/main/java/eu/kanade/domain/history/model/HistoryWithRelations.kt @@ -9,5 +9,5 @@ data class HistoryWithRelations( val title: String, val thumbnailUrl: String, val chapterNumber: Float, - val readAt: Date? + val readAt: Date?, ) diff --git a/app/src/main/java/eu/kanade/domain/manga/interactor/GetFavoritesBySourceId.kt b/app/src/main/java/eu/kanade/domain/manga/interactor/GetFavoritesBySourceId.kt index 9fd42effa..8489d4d57 100644 --- a/app/src/main/java/eu/kanade/domain/manga/interactor/GetFavoritesBySourceId.kt +++ b/app/src/main/java/eu/kanade/domain/manga/interactor/GetFavoritesBySourceId.kt @@ -5,7 +5,7 @@ import eu.kanade.domain.manga.repository.MangaRepository import kotlinx.coroutines.flow.Flow class GetFavoritesBySourceId( - private val mangaRepository: MangaRepository + private val mangaRepository: MangaRepository, ) { fun subscribe(sourceId: Long): Flow> { diff --git a/app/src/main/java/eu/kanade/domain/manga/model/Manga.kt b/app/src/main/java/eu/kanade/domain/manga/model/Manga.kt index 9226c3f61..bed5f1d61 100644 --- a/app/src/main/java/eu/kanade/domain/manga/model/Manga.kt +++ b/app/src/main/java/eu/kanade/domain/manga/model/Manga.kt @@ -17,7 +17,7 @@ data class Manga( val genre: List?, val status: Long, val thumbnailUrl: String?, - val initialized: Boolean + val initialized: Boolean, ) { val sorting: Long diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/GetLanguagesWithSources.kt b/app/src/main/java/eu/kanade/domain/source/interactor/GetLanguagesWithSources.kt index 1c157b5c1..3feef0a3a 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/GetLanguagesWithSources.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/GetLanguagesWithSources.kt @@ -16,19 +16,19 @@ class GetLanguagesWithSources( return combine( preferences.enabledLanguages().asFlow(), preferences.disabledSources().asFlow(), - repository.getOnlineSources() + repository.getOnlineSources(), ) { enabledLanguage, disabledSource, onlineSources -> val sortedSources = onlineSources.sortedWith( compareBy { it.id.toString() in disabledSource } - .thenBy(String.CASE_INSENSITIVE_ORDER) { it.name } + .thenBy(String.CASE_INSENSITIVE_ORDER) { it.name }, ) sortedSources.groupBy { it.lang } .toSortedMap( compareBy( { it !in enabledLanguage }, - { LocaleHelper.getDisplayName(it) } - ) + { LocaleHelper.getDisplayName(it) }, + ), ) } } diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt b/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt index a290091f6..e88012cad 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/GetSourcesWithFavoriteCount.kt @@ -11,14 +11,14 @@ import java.util.Locale class GetSourcesWithFavoriteCount( private val repository: SourceRepository, - private val preferences: PreferencesHelper + private val preferences: PreferencesHelper, ) { fun subscribe(): Flow>> { return combine( preferences.migrationSortingDirection().asFlow(), preferences.migrationSortingMode().asFlow(), - repository.getSourcesWithFavoriteCount() + repository.getSourcesWithFavoriteCount(), ) { direction, mode, list -> list.sortedWith(sortFn(direction, mode)) } @@ -26,7 +26,7 @@ class GetSourcesWithFavoriteCount( private fun sortFn( direction: SetMigrateSorting.Direction, - sorting: SetMigrateSorting.Mode + sorting: SetMigrateSorting.Mode, ): java.util.Comparator> { val locale = Locale.getDefault() val collator = Collator.getInstance(locale).apply { diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/SetMigrateSorting.kt b/app/src/main/java/eu/kanade/domain/source/interactor/SetMigrateSorting.kt index 8728a9a54..c93c56ee1 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/SetMigrateSorting.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/SetMigrateSorting.kt @@ -3,7 +3,7 @@ package eu.kanade.domain.source.interactor import eu.kanade.tachiyomi.data.preference.PreferencesHelper class SetMigrateSorting( - private val preferences: PreferencesHelper + private val preferences: PreferencesHelper, ) { fun await(mode: Mode, isAscending: Boolean) { diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt index da373e829..c05559837 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleLanguage.kt @@ -5,7 +5,7 @@ import eu.kanade.tachiyomi.util.preference.minusAssign import eu.kanade.tachiyomi.util.preference.plusAssign class ToggleLanguage( - val preferences: PreferencesHelper + val preferences: PreferencesHelper, ) { fun await(language: String) { diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt index 8c9296d12..be1ec7a28 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSource.kt @@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.util.preference.minusAssign import eu.kanade.tachiyomi.util.preference.plusAssign class ToggleSource( - private val preferences: PreferencesHelper + private val preferences: PreferencesHelper, ) { fun await(source: Source) { diff --git a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt index 5a5e92df4..d7229ab46 100644 --- a/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt +++ b/app/src/main/java/eu/kanade/domain/source/interactor/ToggleSourcePin.kt @@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.util.preference.minusAssign import eu.kanade.tachiyomi.util.preference.plusAssign class ToggleSourcePin( - private val preferences: PreferencesHelper + private val preferences: PreferencesHelper, ) { fun await(source: Source) { diff --git a/app/src/main/java/eu/kanade/domain/source/model/Source.kt b/app/src/main/java/eu/kanade/domain/source/model/Source.kt index 0f9d429ad..00b494ba4 100644 --- a/app/src/main/java/eu/kanade/domain/source/model/Source.kt +++ b/app/src/main/java/eu/kanade/domain/source/model/Source.kt @@ -13,7 +13,7 @@ data class Source( val name: String, val supportsLatest: Boolean, val pin: Pins = Pins.unpinned, - val isUsedLast: Boolean = false + val isUsedLast: Boolean = false, ) { val nameWithLanguage: String diff --git a/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt b/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt index e94bef827..f43d056e9 100644 --- a/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/components/EmptyScreen.kt @@ -29,7 +29,7 @@ fun EmptyScreen( ) { Box( modifier = Modifier - .fillMaxSize() + .fillMaxSize(), ) { AndroidView( factory = { context -> diff --git a/app/src/main/java/eu/kanade/presentation/components/MangaCover.kt b/app/src/main/java/eu/kanade/presentation/components/MangaCover.kt index c949dcf8b..3b2504d99 100644 --- a/app/src/main/java/eu/kanade/presentation/components/MangaCover.kt +++ b/app/src/main/java/eu/kanade/presentation/components/MangaCover.kt @@ -23,7 +23,7 @@ enum class MangaCover(private val ratio: Float) { modifier: Modifier = Modifier, data: String?, contentDescription: String? = null, - shape: Shape? = null + shape: Shape? = null, ) { AsyncImage( model = data, diff --git a/app/src/main/java/eu/kanade/presentation/components/Preferences.kt b/app/src/main/java/eu/kanade/presentation/components/Preferences.kt index d358f69cb..a0b6d6427 100644 --- a/app/src/main/java/eu/kanade/presentation/components/Preferences.kt +++ b/app/src/main/java/eu/kanade/presentation/components/Preferences.kt @@ -56,7 +56,7 @@ fun PreferenceRow( onLongClick = onLongClick, onClick = onClick, ), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { if (painter != null) { Icon( @@ -71,7 +71,7 @@ fun PreferenceRow( Column( Modifier .padding(horizontal = horizontalPadding) - .weight(1f) + .weight(1f), ) { Text( text = title, diff --git a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt index 429e4bbfa..6904cafa5 100644 --- a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt @@ -88,7 +88,7 @@ fun HistoryContent( onClickResume: (HistoryWithRelations) -> Unit, onClickDelete: (HistoryWithRelations, Boolean) -> Unit, preferences: PreferencesHelper = Injekt.get(), - nestedScroll: NestedScrollConnection + nestedScroll: NestedScrollConnection, ) { if (history.loadState.refresh is LoadState.Loading) { LoadingScreen() @@ -118,7 +118,7 @@ fun HistoryContent( .animateItemPlacement(), date = item.date, relativeTime = relativeTime, - dateFormat = dateFormat + dateFormat = dateFormat, ) } is HistoryUiModel.Item -> { @@ -142,7 +142,7 @@ fun HistoryContent( onClickDelete(removeState, all) setRemoveState(null) }, - onNegative = { setRemoveState(null) } + onNegative = { setRemoveState(null) }, ) } } @@ -160,12 +160,12 @@ fun HistoryHeader( text = date.toRelativeString( LocalContext.current, relativeTime, - dateFormat + dateFormat, ), style = MaterialTheme.typography.bodyMedium.copy( color = MaterialTheme.colorScheme.onSurfaceVariant, fontWeight = FontWeight.SemiBold, - ) + ), ) } @@ -200,7 +200,7 @@ fun HistoryItem( text = history.title, maxLines = 2, overflow = TextOverflow.Ellipsis, - style = textStyle.copy(fontWeight = FontWeight.SemiBold) + style = textStyle.copy(fontWeight = FontWeight.SemiBold), ) Row { Text( @@ -232,7 +232,7 @@ fun HistoryItem( @Composable fun RemoveHistoryDialog( onPositive: (Boolean) -> Unit, - onNegative: () -> Unit + onNegative: () -> Unit, ) { val (removeEverything, removeEverythingState) = remember { mutableStateOf(false) } @@ -250,9 +250,9 @@ fun RemoveHistoryDialog( interactionSource = remember { MutableInteractionSource() }, indication = null, value = removeEverything, - onValueChange = removeEverythingState + onValueChange = removeEverythingState, ), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { Checkbox( checked = removeEverything, @@ -260,7 +260,7 @@ fun RemoveHistoryDialog( ) Text( modifier = Modifier.padding(start = 4.dp), - text = stringResource(id = R.string.dialog_with_checkbox_reset) + text = stringResource(id = R.string.dialog_with_checkbox_reset), ) } } diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt index 1f00c52ba..49795acaa 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/BaseMangaListItem.kt @@ -33,7 +33,7 @@ fun BaseMangaListItem( .clickable(onClick = onClickItem) .height(56.dp) .padding(horizontal = horizontalPadding), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { cover() content() @@ -47,7 +47,7 @@ private val defaultCover: @Composable RowScope.(Manga, () -> Unit) -> Unit = { m .padding(vertical = 8.dp) .clickable(onClick = onClick) .fillMaxHeight(), - data = manga.thumbnailUrl + data = manga.thumbnailUrl, ) } @@ -59,7 +59,7 @@ private val defaultContent: @Composable RowScope.(Manga) -> Unit = { .padding(start = horizontalPadding), overflow = TextOverflow.Ellipsis, maxLines = 1, - style = MaterialTheme.typography.bodyMedium + style = MaterialTheme.typography.bodyMedium, ) } } diff --git a/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt b/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt index 3506ed505..b992633a3 100644 --- a/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt +++ b/app/src/main/java/eu/kanade/presentation/more/LogoHeader.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.R fun LogoHeader() { Column { Surface( - modifier = Modifier.fillMaxWidth() + modifier = Modifier.fillMaxWidth(), ) { Icon( painter = painterResource(R.drawable.ic_tachi), diff --git a/app/src/main/java/eu/kanade/presentation/source/MigrateMangaScreen.kt b/app/src/main/java/eu/kanade/presentation/source/MigrateMangaScreen.kt index 2bb052638..4f0bb1872 100644 --- a/app/src/main/java/eu/kanade/presentation/source/MigrateMangaScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/source/MigrateMangaScreen.kt @@ -25,7 +25,7 @@ fun MigrateMangaScreen( nestedScrollInterop: NestedScrollConnection, presenter: MigrationMangaPresenter, onClickItem: (Manga) -> Unit, - onClickCover: (Manga) -> Unit + onClickCover: (Manga) -> Unit, ) { val state by presenter.state.collectAsState() @@ -48,7 +48,7 @@ fun MigrateMangaContent( nestedScrollInterop: NestedScrollConnection, list: List, onClickItem: (Manga) -> Unit, - onClickCover: (Manga) -> Unit + onClickCover: (Manga) -> Unit, ) { if (list.isEmpty()) { EmptyScreen(textResource = R.string.migrate_empty_screen) @@ -62,7 +62,7 @@ fun MigrateMangaContent( MigrateMangaItem( manga = manga, onClickItem = onClickItem, - onClickCover = onClickCover + onClickCover = onClickCover, ) } } @@ -73,12 +73,12 @@ fun MigrateMangaItem( modifier: Modifier = Modifier, manga: Manga, onClickItem: (Manga) -> Unit, - onClickCover: (Manga) -> Unit + onClickCover: (Manga) -> Unit, ) { BaseMangaListItem( modifier = modifier, manga = manga, onClickItem = { onClickItem(manga) }, - onClickCover = { onClickCover(manga) } + onClickCover = { onClickCover(manga) }, ) } diff --git a/app/src/main/java/eu/kanade/presentation/source/MigrateSourceScreen.kt b/app/src/main/java/eu/kanade/presentation/source/MigrateSourceScreen.kt index 37acf32f0..5394200d3 100644 --- a/app/src/main/java/eu/kanade/presentation/source/MigrateSourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/source/MigrateSourceScreen.kt @@ -70,7 +70,7 @@ fun MigrateSourceList( modifier = Modifier .animateItemPlacement() .padding(horizontal = horizontalPadding, vertical = 8.dp), - style = MaterialTheme.typography.header + style = MaterialTheme.typography.header, ) } @@ -78,14 +78,14 @@ fun MigrateSourceList( items = list, key = { (source, _) -> source.id - } + }, ) { (source, count) -> MigrateSourceItem( modifier = Modifier.animateItemPlacement(), source = source, count = count, onClickItem = { onClickItem(source) }, - onLongClickItem = { onLongClickItem(source) } + onLongClickItem = { onLongClickItem(source) }, ) } } diff --git a/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt b/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt index 8e577af07..4bf8b9975 100644 --- a/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/source/SourceFilterScreen.kt @@ -31,7 +31,7 @@ fun SourceFilterScreen( nestedScrollInterop: NestedScrollConnection, presenter: SourceFilterPresenter, onClickLang: (String) -> Unit, - onClickSource: (Source) -> Unit + onClickSource: (Source) -> Unit, ) { val state by presenter.state.collectAsState() @@ -53,7 +53,7 @@ fun SourceFilterContent( nestedScrollInterop: NestedScrollConnection, items: List, onClickLang: (String) -> Unit, - onClickSource: (Source) -> Unit + onClickSource: (Source) -> Unit, ) { if (items.isEmpty()) { EmptyScreen(textResource = R.string.source_filter_empty_screen) @@ -76,7 +76,7 @@ fun SourceFilterContent( is FilterUiModel.Header -> it.hashCode() is FilterUiModel.Item -> it.source.key() } - } + }, ) { model -> when (model) { is FilterUiModel.Header -> { @@ -84,14 +84,14 @@ fun SourceFilterContent( modifier = Modifier.animateItemPlacement(), language = model.language, isEnabled = model.isEnabled, - onClickItem = onClickLang + onClickItem = onClickLang, ) } is FilterUiModel.Item -> SourceFilterItem( modifier = Modifier.animateItemPlacement(), source = model.source, isEnabled = model.isEnabled, - onClickItem = onClickSource + onClickItem = onClickSource, ) } } @@ -103,7 +103,7 @@ fun SourceFilterHeader( modifier: Modifier, language: String, isEnabled: Boolean, - onClickItem: (String) -> Unit + onClickItem: (String) -> Unit, ) { PreferenceRow( modifier = modifier, @@ -120,7 +120,7 @@ fun SourceFilterItem( modifier: Modifier, source: Source, isEnabled: Boolean, - onClickItem: (Source) -> Unit + onClickItem: (Source) -> Unit, ) { BaseSourceItem( modifier = modifier, @@ -129,6 +129,6 @@ fun SourceFilterItem( onClickItem = { onClickItem(source) }, action = { Checkbox(checked = isEnabled, onCheckedChange = null) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/presentation/source/SourceScreen.kt b/app/src/main/java/eu/kanade/presentation/source/SourceScreen.kt index b2487936b..0e34c9419 100644 --- a/app/src/main/java/eu/kanade/presentation/source/SourceScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/source/SourceScreen.kt @@ -105,13 +105,13 @@ fun SourceList( is SourceUiModel.Header -> it.hashCode() is SourceUiModel.Item -> it.source.key() } - } + }, ) { model -> when (model) { is SourceUiModel.Header -> { SourceHeader( modifier = Modifier.animateItemPlacement(), - language = model.language + language = model.language, ) } is SourceUiModel.Item -> SourceItem( @@ -139,7 +139,7 @@ fun SourceList( onClickDisable(sourceState) setSourceState(null) }, - onDismiss = { setSourceState(null) } + onDismiss = { setSourceState(null) }, ) } } @@ -147,14 +147,14 @@ fun SourceList( @Composable fun SourceHeader( modifier: Modifier = Modifier, - language: String + language: String, ) { val context = LocalContext.current Text( text = LocaleHelper.getSourceDisplayName(language, context), modifier = modifier .padding(horizontal = horizontalPadding, vertical = 8.dp), - style = MaterialTheme.typography.header + style = MaterialTheme.typography.header, ) } @@ -165,7 +165,7 @@ fun SourceItem( onClickItem: (Source) -> Unit, onLongClickItem: (Source) -> Unit, onClickLatest: (Source) -> Unit, - onClickPin: (Source) -> Unit + onClickPin: (Source) -> Unit, ) { BaseSourceItem( modifier = modifier, @@ -178,14 +178,14 @@ fun SourceItem( Text( text = stringResource(id = R.string.latest), style = LocalTextStyle.current.copy( - color = MaterialTheme.colorScheme.primary - ) + color = MaterialTheme.colorScheme.primary, + ), ) } } SourcePinButton( isPinned = Pin.Pinned in source.pin, - onClick = { onClickPin(source) } + onClick = { onClickPin(source) }, ) }, ) @@ -193,7 +193,7 @@ fun SourceItem( @Composable fun SourceIcon( - source: Source + source: Source, ) { val icon = source.icon val modifier = Modifier @@ -217,7 +217,7 @@ fun SourceIcon( @Composable fun SourcePinButton( isPinned: Boolean, - onClick: () -> Unit + onClick: () -> Unit, ) { val icon = if (isPinned) Icons.Filled.PushPin else Icons.Outlined.PushPin val tint = if (isPinned) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onBackground @@ -225,7 +225,7 @@ fun SourcePinButton( Icon( imageVector = icon, contentDescription = "", - tint = tint + tint = tint, ) } } @@ -249,7 +249,7 @@ fun SourceOptionsDialog( modifier = Modifier .clickable(onClick = onClickPin) .fillMaxWidth() - .padding(vertical = 16.dp) + .padding(vertical = 16.dp), ) if (source.id != LocalSource.ID) { Text( @@ -257,7 +257,7 @@ fun SourceOptionsDialog( modifier = Modifier .clickable(onClick = onClickDisable) .fillMaxWidth() - .padding(vertical = 16.dp) + .padding(vertical = 16.dp), ) } } diff --git a/app/src/main/java/eu/kanade/presentation/source/components/BaseSourceItem.kt b/app/src/main/java/eu/kanade/presentation/source/components/BaseSourceItem.kt index 0e49eced8..4f35d7e4d 100644 --- a/app/src/main/java/eu/kanade/presentation/source/components/BaseSourceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/source/components/BaseSourceItem.kt @@ -32,10 +32,10 @@ fun BaseSourceItem( modifier = modifier .combinedClickable( onClick = onClickItem, - onLongClick = onLongClickItem + onLongClick = onLongClickItem, ) .padding(horizontal = horizontalPadding, vertical = 8.dp), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { icon.invoke(this, source) content.invoke(this, source, showLanguageInContent) @@ -51,20 +51,20 @@ private val defaultContent: @Composable RowScope.(Source, Boolean) -> Unit = { s Column( modifier = Modifier .padding(horizontal = horizontalPadding) - .weight(1f) + .weight(1f), ) { Text( text = source.name, maxLines = 1, overflow = TextOverflow.Ellipsis, - style = MaterialTheme.typography.bodyMedium + style = MaterialTheme.typography.bodyMedium, ) if (showLanguageInContent) { Text( text = LocaleHelper.getDisplayName(source.lang), maxLines = 1, overflow = TextOverflow.Ellipsis, - style = MaterialTheme.typography.bodySmall + style = MaterialTheme.typography.bodySmall, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt index a1291f94c..e199f01b5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt @@ -43,7 +43,7 @@ class AppModule(val app: Application) : InjektModule { .callback(DbOpenCallback()) .name(DbOpenCallback.DATABASE_NAME) .noBackupDirectory(false) - .build() + .build(), ) } @@ -56,11 +56,11 @@ class AppModule(val app: Application) : InjektModule { driver = get(), historyAdapter = History.Adapter( history_last_readAdapter = dateAdapter, - history_time_readAdapter = dateAdapter + history_time_readAdapter = dateAdapter, ), mangasAdapter = Mangas.Adapter( - genreAdapter = listOfStringsAdapter - ) + genreAdapter = listOfStringsAdapter, + ), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt index a27e4cbad..d5cf59403 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt @@ -26,7 +26,7 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(Database.Schema.version) Database.Schema.migrate( driver = AndroidSqliteDriver(database = db, cacheSize = 1), oldVersion = oldVersion, - newVersion = newVersion + newVersion = newVersion, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt index 5adece44b..23509cb78 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt @@ -42,7 +42,7 @@ class MigrationMangaController : ComposeController { }, onClickCover = { router.pushController(MangaController(it.id)) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaPresenter.kt index 156bb5cd5..951792472 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaPresenter.kt @@ -15,7 +15,7 @@ import uy.kohesive.injekt.api.get class MigrationMangaPresenter( private val sourceId: Long, - private val getFavoritesBySourceId: GetFavoritesBySourceId = Injekt.get() + private val getFavoritesBySourceId: GetFavoritesBySourceId = Injekt.get(), ) : BasePresenter() { private val _state: MutableStateFlow = MutableStateFlow(MigrateMangaState.Loading) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt index 4c4dfe3bd..f84c91a5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt @@ -28,7 +28,7 @@ class SearchController( constructor(mangaId: Long) : this( Injekt.get() .getManga(mangaId) - .executeAsBlocking() + .executeAsBlocking(), ) private var newManga: Manga? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt index 3b03e966d..136e418ac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt @@ -30,8 +30,8 @@ class MigrationSourcesController : ComposeController( parentController!!.router.pushController( MigrationMangaController( source.id, - source.name - ) + source.name, + ), ) }, onLongClickItem = { source -> @@ -51,12 +51,14 @@ class MigrationSourcesController : ComposeController( true } R.id.asc_alphabetical, - R.id.desc_alphabetical -> { + R.id.desc_alphabetical, +-> { presenter.setAlphabeticalSorting(itemId == R.id.asc_alphabetical) true } R.id.asc_count, - R.id.desc_count -> { + R.id.desc_count, +-> { presenter.setTotalSorting(itemId == R.id.asc_count) true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesPresenter.kt index 019d31817..904ade749 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesPresenter.kt @@ -16,7 +16,7 @@ import uy.kohesive.injekt.api.get class MigrationSourcesPresenter( private val getSourcesWithFavoriteCount: GetSourcesWithFavoriteCount = Injekt.get(), - private val setMigrateSorting: SetMigrateSorting = Injekt.get() + private val setMigrateSorting: SetMigrateSorting = Injekt.get(), ) : BasePresenter() { private val _state: MutableStateFlow = MutableStateFlow(MigrateSourceState.Loading) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterPresenter.kt index d57048c6d..dfe1b26f4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterPresenter.kt @@ -20,7 +20,7 @@ class SourceFilterPresenter( private val getLanguagesWithSources: GetLanguagesWithSources = Injekt.get(), private val toggleSource: ToggleSource = Injekt.get(), private val toggleLanguage: ToggleLanguage = Injekt.get(), - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) : BasePresenter() { private val _state: MutableStateFlow = MutableStateFlow(SourceFilterState.Loading) @@ -49,7 +49,7 @@ class SourceFilterPresenter( header + it.value.map { source -> FilterUiModel.Item( source, - source.id.toString() !in preferences.disabledSources().get() + source.id.toString() !in preferences.disabledSources().get(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcePresenter.kt index 3f30be1f9..9de170ebf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcePresenter.kt @@ -25,7 +25,7 @@ import java.util.TreeMap class SourcePresenter( private val getEnabledSources: GetEnabledSources = Injekt.get(), private val toggleSource: ToggleSource = Injekt.get(), - private val toggleSourcePin: ToggleSourcePin = Injekt.get() + private val toggleSourcePin: ToggleSourcePin = Injekt.get(), ) : BasePresenter() { private val _state: MutableStateFlow = MutableStateFlow(SourceState.Loading) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt index 162b919e4..4aee9e246 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt @@ -25,7 +25,7 @@ fun syncChaptersWithSource( db: DatabaseHelper, rawSourceChapters: List, manga: Manga, - source: Source + source: Source, ): Pair, List> { if (rawSourceChapters.isEmpty()) { throw NoChaptersException() diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt index dae4a0084..e3209c384 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt @@ -91,7 +91,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( currentAnimator = null postInvalidate() } - }) + },) } internal class SavedState : AbsSavedState { diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt index 38e71410f..4c5bd324d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt @@ -25,7 +25,7 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) : override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ThemeViewHolder { val themeResIds = ThemingDelegate.getThemeResIds(themes[viewType], preferences.themeDarkAmoled().get()) val themedContext = themeResIds.fold(parent.context) { - context, themeResId -> + context, themeResId -> ContextThemeWrapper(context, themeResId) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7e31dbe10..fb2c05b57 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -111,5 +111,5 @@ conductor = ["conductor-core","conductor-viewpager","conductor-support-preferenc shizuku = ["shizuku-api","shizuku-provider"] [plugins] -kotlinter = { id = "org.jmailen.kotlinter", version = "3.6.0"} +kotlinter = { id = "org.jmailen.kotlinter", version = "3.10.0"} versionsx = { id = "com.github.ben-manes.versions", version = "0.42.0"} \ No newline at end of file