From f0eb42e72d1e267049777a303bd97d96517a9a1f Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 8 Apr 2022 15:30:30 -0400 Subject: [PATCH] Update linter --- .editorconfig | 5 + .../data/backup/AbstractBackupRestore.kt | 2 +- .../tachiyomi/data/backup/BackupNotifier.kt | 2 +- .../data/backup/full/FullBackupRestore.kt | 6 +- .../data/backup/full/models/Backup.kt | 2 +- .../data/backup/full/models/BackupHistory.kt | 4 +- .../data/backup/full/models/BackupManga.kt | 2 +- .../data/backup/full/models/BackupSource.kt | 4 +- .../data/backup/legacy/LegacyBackupRestore.kt | 6 +- .../data/backup/legacy/models/Backup.kt | 4 +- .../tachiyomi/data/coil/MangaCoverFetcher.kt | 4 +- .../data/database/queries/MangaQueries.kt | 2 +- .../data/database/tables/TrackTable.kt | 2 +- .../tachiyomi/data/download/DownloadCache.kt | 8 +- .../data/download/DownloadManager.kt | 2 +- .../data/download/DownloadPendingDeleter.kt | 6 +- .../data/download/DownloadService.kt | 4 +- .../tachiyomi/data/download/DownloadStore.kt | 2 +- .../tachiyomi/data/download/Downloader.kt | 4 +- .../data/download/model/DownloadQueue.kt | 2 +- .../data/library/LibraryUpdateService.kt | 8 +- .../data/notification/NotificationReceiver.kt | 4 +- .../data/notification/Notifications.kt | 6 +- .../kanade/tachiyomi/data/saver/ImageSaver.kt | 8 +- .../data/track/anilist/AnilistApi.kt | 15 +- .../data/track/anilist/AnilistModels.kt | 4 +- .../tachiyomi/data/track/anilist/OAuth.kt | 2 +- .../tachiyomi/data/track/bangumi/Avatar.kt | 2 +- .../data/track/bangumi/Collection.kt | 2 +- .../tachiyomi/data/track/bangumi/OAuth.kt | 2 +- .../tachiyomi/data/track/bangumi/Status.kt | 2 +- .../tachiyomi/data/track/bangumi/User.kt | 2 +- .../data/track/job/DelayedTrackingStore.kt | 2 +- .../tachiyomi/data/track/kitsu/KitsuApi.kt | 2 +- .../tachiyomi/data/track/kitsu/OAuth.kt | 2 +- .../tachiyomi/data/track/komga/KomgaModels.kt | 12 +- .../tachiyomi/data/track/myanimelist/OAuth.kt | 2 +- .../tachiyomi/data/track/shikimori/OAuth.kt | 2 +- .../data/updater/AppUpdateNotifier.kt | 4 +- .../tachiyomi/data/updater/GithubRelease.kt | 2 +- .../tachiyomi/extension/ExtensionManager.kt | 2 +- .../extension/api/ExtensionGithubApi.kt | 2 +- .../tachiyomi/extension/model/Extension.kt | 6 +- .../extension/util/ExtensionInstallService.kt | 2 +- .../kanade/tachiyomi/network/DohProviders.kt | 8 +- .../eu/kanade/tachiyomi/network/Requests.kt | 4 +- .../interceptor/CloudflareInterceptor.kt | 2 +- .../eu/kanade/tachiyomi/source/LocalSource.kt | 4 +- .../eu/kanade/tachiyomi/source/model/Page.kt | 2 +- .../controller/OneWayFadeChangeHandler.kt | 2 +- .../controller/SearchableNucleusController.kt | 5 +- .../ui/browse/extension/ExtensionGroupItem.kt | 4 +- .../ui/browse/extension/ExtensionItem.kt | 4 +- .../ui/browse/extension/ExtensionPresenter.kt | 8 +- .../details/SourcePreferencesPresenter.kt | 2 +- .../migration/manga/MigrationMangaHolder.kt | 2 +- .../migration/manga/MigrationMangaItem.kt | 2 +- .../manga/MigrationMangaPresenter.kt | 2 +- .../migration/search/SearchController.kt | 4 +- .../migration/search/SearchPresenter.kt | 4 +- .../search/SourceSearchController.kt | 2 +- .../sources/MigrationSourcesPresenter.kt | 2 +- .../migration/sources/SelectionHeader.kt | 2 +- .../ui/browse/migration/sources/SourceItem.kt | 2 +- .../tachiyomi/ui/browse/source/LangItem.kt | 2 +- .../tachiyomi/ui/browse/source/SourceItem.kt | 4 +- .../ui/browse/source/SourcePresenter.kt | 2 +- .../source/browse/BrowseSourcePresenter.kt | 2 +- .../browse/SourceComfortableGridHolder.kt | 2 +- .../source/browse/SourceCompactGridHolder.kt | 2 +- .../browse/source/browse/SourceFilterSheet.kt | 4 +- .../ui/browse/source/browse/SourceItem.kt | 4 +- .../globalsearch/GlobalSearchCardItem.kt | 2 +- .../globalsearch/GlobalSearchController.kt | 2 +- .../source/globalsearch/GlobalSearchItem.kt | 2 +- .../globalsearch/GlobalSearchPresenter.kt | 2 +- .../tachiyomi/ui/category/CategoryItem.kt | 2 +- .../ui/category/CategoryPresenter.kt | 2 +- .../ui/download/DownloadController.kt | 4 +- .../ui/download/DownloadHeaderItem.kt | 6 +- .../tachiyomi/ui/download/DownloadItem.kt | 6 +- .../ui/library/ChangeMangaCategoriesDialog.kt | 2 +- .../ui/library/DeleteLibraryMangasDialog.kt | 2 +- .../tachiyomi/ui/library/LibraryAdapter.kt | 2 +- .../library/LibraryComfortableGridHolder.kt | 2 +- .../ui/library/LibraryCompactGridHolder.kt | 2 +- .../tachiyomi/ui/library/LibraryController.kt | 4 +- .../tachiyomi/ui/library/LibraryHolder.kt | 2 +- .../tachiyomi/ui/library/LibraryItem.kt | 4 +- .../tachiyomi/ui/library/LibraryListHolder.kt | 2 +- .../tachiyomi/ui/library/LibraryPresenter.kt | 2 +- .../ui/library/LibrarySettingsSheet.kt | 2 +- .../kanade/tachiyomi/ui/main/MainActivity.kt | 4 +- .../tachiyomi/ui/manga/MangaController.kt | 14 +- .../tachiyomi/ui/manga/MangaPresenter.kt | 2 +- .../ui/manga/chapter/ChapterHolder.kt | 2 +- .../tachiyomi/ui/manga/chapter/ChapterItem.kt | 2 +- .../ui/manga/chapter/ChaptersAdapter.kt | 2 +- .../ui/manga/chapter/ChaptersSettingsSheet.kt | 2 +- .../chapter/MangaChaptersHeaderAdapter.kt | 2 +- .../manga/chapter/base/BaseChapterHolder.kt | 2 +- .../ui/manga/chapter/base/BaseChapterItem.kt | 2 +- .../ui/manga/track/TrackSearchAdapter.kt | 2 +- .../ui/manga/track/TrackSearchDialog.kt | 2 +- .../ui/manga/track/TrackSearchHolder.kt | 2 +- .../tachiyomi/ui/manga/track/TrackSheet.kt | 2 +- .../ui/more/licenses/LicensesItem.kt | 2 +- .../ui/reader/PageIndicatorTextView.kt | 2 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 4 +- .../ui/reader/ReaderColorFilterView.kt | 2 +- .../tachiyomi/ui/reader/ReaderPageSheet.kt | 2 +- .../tachiyomi/ui/reader/ReaderPresenter.kt | 2 +- .../tachiyomi/ui/reader/ReaderSlider.kt | 2 +- .../ui/reader/loader/ChapterLoader.kt | 2 +- .../ui/reader/loader/DownloadPageLoader.kt | 2 +- .../ui/reader/loader/HttpPageLoader.kt | 4 +- .../ui/reader/model/ChapterTransition.kt | 4 +- .../tachiyomi/ui/reader/model/ReaderPage.kt | 2 +- .../ui/reader/model/ViewerChapters.kt | 2 +- .../ui/reader/setting/ReaderSettingsSheet.kt | 4 +- .../viewer/GestureDetectorWithLongTap.kt | 2 +- .../ui/reader/viewer/ReaderButton.kt | 2 +- .../ui/reader/viewer/ReaderPageImageView.kt | 6 +- .../reader/viewer/ReaderProgressIndicator.kt | 2 +- .../ui/reader/viewer/ViewerConfig.kt | 2 +- .../ui/reader/viewer/ViewerNavigation.kt | 2 +- .../viewer/navigation/EdgeNavigation.kt | 2 +- .../navigation/RightAndLeftNavigation.kt | 2 +- .../tachiyomi/ui/reader/viewer/pager/Pager.kt | 2 +- .../ui/reader/viewer/pager/PagerConfig.kt | 2 +- .../ui/reader/viewer/pager/PagerPageHolder.kt | 4 +- .../viewer/pager/PagerTransitionHolder.kt | 2 +- .../reader/viewer/pager/PagerViewerAdapter.kt | 2 +- .../reader/viewer/webtoon/WebtoonAdapter.kt | 2 +- .../viewer/webtoon/WebtoonBaseHolder.kt | 2 +- .../ui/reader/viewer/webtoon/WebtoonConfig.kt | 2 +- .../ui/reader/viewer/webtoon/WebtoonFrame.kt | 2 +- .../viewer/webtoon/WebtoonPageHolder.kt | 2 +- .../viewer/webtoon/WebtoonRecyclerView.kt | 4 +- .../webtoon/WebtoonSubsamplingImageView.kt | 2 +- .../viewer/webtoon/WebtoonTransitionHolder.kt | 2 +- .../ui/reader/viewer/webtoon/WebtoonViewer.kt | 6 +- .../ui/recent/history/HistoryHolder.kt | 2 +- .../ui/recent/history/HistoryItem.kt | 2 +- .../ui/recent/updates/UpdatesAdapter.kt | 2 +- .../ui/recent/updates/UpdatesItem.kt | 2 +- .../tachiyomi/ui/security/UnlockActivity.kt | 4 +- .../ui/setting/SettingsAdvancedController.kt | 4 +- .../setting/SettingsAppearanceController.kt | 2 +- .../ui/setting/SettingsBrowseController.kt | 2 +- .../ui/setting/SettingsLibraryController.kt | 6 +- .../ui/setting/SettingsReaderController.kt | 2 +- .../ui/setting/SettingsSecurityController.kt | 6 +- .../ui/setting/SettingsTrackingController.kt | 2 +- .../setting/search/SettingsSearchAdapter.kt | 2 +- .../ui/setting/search/SettingsSearchHelper.kt | 4 +- .../ui/setting/search/SettingsSearchItem.kt | 6 +- .../ui/setting/track/TrackLoginDialog.kt | 2 +- .../util/chapter/ChapterSourceSync.kt | 2 +- .../tachiyomi/util/lang/DateExtensions.kt | 2 +- .../tachiyomi/util/lang/RetryWithDelay.kt | 2 +- .../tachiyomi/util/lang/RxCoroutineBridge.kt | 10 +- .../util/preference/PreferenceDSL.kt | 4 +- .../util/system/AuthenticatorUtil.kt | 6 +- .../tachiyomi/util/system/LogcatExtensions.kt | 2 +- .../util/system/NotificationExtensions.kt | 4 +- .../util/system/WebViewClientCompat.kt | 14 +- .../util/view/ImageViewExtensions.kt | 2 +- .../tachiyomi/util/view/ViewExtensions.kt | 8 +- .../eu/kanade/tachiyomi/widget/EmptyView.kt | 2 +- .../widget/ExtendedNavigationView.kt | 2 +- .../HideBottomNavigationOnScrollBehavior.kt | 10 +- .../tachiyomi/widget/MangaSummaryView.kt | 2 +- .../tachiyomi/widget/MaterialFastScroll.kt | 2 +- .../eu/kanade/tachiyomi/widget/OutlineSpan.kt | 6 +- .../tachiyomi/widget/SimpleNavigationView.kt | 2 +- .../tachiyomi/widget/TachiyomiAppBarLayout.kt | 2 +- .../widget/TachiyomiBottomNavigationView.kt | 2 +- .../TachiyomiChangeHandlerFrameLayout.kt | 2 +- .../widget/TachiyomiCoordinatorLayout.kt | 4 +- .../tachiyomi/widget/TachiyomiSearchView.kt | 2 +- .../widget/TachiyomiTextInputEditText.kt | 2 +- .../widget/ThemedSwipeRefreshLayout.kt | 2 +- .../MaterialAlertDialogBuilderExtensions.kt | 4 +- .../QuadStateMultiChoiceDialogAdapter.kt | 8 +- .../QuadStateMultiChoiceViewHolder.kt | 2 +- .../preference/LoginDialogPreference.kt | 2 +- .../preference/SwitchPreferenceCategory.kt | 2 +- .../preference/ThemesPreferenceAdapter.kt | 2 +- .../widget/sheet/BottomSheetViewPager.kt | 2 +- gradle/libs.versions.toml | 2 +- ktlintCodeStyle.xml | 136 ------------------ 192 files changed, 318 insertions(+), 437 deletions(-) create mode 100644 .editorconfig delete mode 100644 ktlintCodeStyle.xml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..b0aa6f2c24 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.{kt,kts}] +indent_size=4 +insert_final_newline=true +ij_kotlin_allow_trailing_comma=true +ij_kotlin_allow_trailing_comma_on_call_site=true \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupRestore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupRestore.kt index 10fa5bd315..a648df8cb6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupRestore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupRestore.kt @@ -112,7 +112,7 @@ abstract class AbstractBackupRestore(protected val co internal fun showRestoreProgress( progress: Int, amount: Int, - title: String + title: String, ) { notifier.showRestoreProgress(title, progress, amount) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupNotifier.kt index f0c9873a35..41e5f77a22 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupNotifier.kt @@ -144,7 +144,7 @@ class BackupNotifier(private val context: Context) { addAction( R.drawable.ic_folder_24dp, context.getString(R.string.action_show_errors), - errorLogIntent, + errorLogIntent ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt index be5d73e523..573d5f0bd2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt @@ -93,7 +93,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa categories: List, history: List, tracks: List, - backupCategories: List + backupCategories: List, ) { db.inTransaction { val dbManga = backupManager.getMangaFromDatabase(manga) @@ -123,7 +123,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa categories: List, history: List, tracks: List, - backupCategories: List + backupCategories: List, ) { try { val fetchedManga = backupManager.restoreManga(manga) @@ -143,7 +143,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa categories: List, history: List, tracks: List, - backupCategories: List + backupCategories: List, ) { backupManager.restoreChaptersForManga(backupManga, chapters) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/Backup.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/Backup.kt index ad0fb5b747..bc1d333d1b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/Backup.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/Backup.kt @@ -9,5 +9,5 @@ data class Backup( @ProtoNumber(2) var backupCategories: List = emptyList(), // Bump by 100 to specify this is a 0.x value @ProtoNumber(100) var backupBrokenSources: List = emptyList(), - @ProtoNumber(101) var backupSources: List = emptyList() + @ProtoNumber(101) var backupSources: List = emptyList(), ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupHistory.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupHistory.kt index 98b415e60e..790e433c91 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupHistory.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupHistory.kt @@ -6,11 +6,11 @@ import kotlinx.serialization.protobuf.ProtoNumber @Serializable data class BrokenBackupHistory( @ProtoNumber(0) var url: String, - @ProtoNumber(1) var lastRead: Long + @ProtoNumber(1) var lastRead: Long, ) @Serializable data class BackupHistory( @ProtoNumber(1) var url: String, - @ProtoNumber(2) var lastRead: Long + @ProtoNumber(2) var lastRead: Long, ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt index e513b0aa2e..242a59cd72 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt @@ -35,7 +35,7 @@ data class BackupManga( @ProtoNumber(101) var chapterFlags: Int = 0, @ProtoNumber(102) var brokenHistory: List = emptyList(), @ProtoNumber(103) var viewer_flags: Int? = null, - @ProtoNumber(104) var history: List = emptyList() + @ProtoNumber(104) var history: List = emptyList(), ) { fun getMangaImpl(): MangaImpl { return MangaImpl().apply { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupSource.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupSource.kt index a8c12f5843..ecda179c41 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupSource.kt @@ -7,13 +7,13 @@ import kotlinx.serialization.protobuf.ProtoNumber @Serializable data class BrokenBackupSource( @ProtoNumber(0) var name: String = "", - @ProtoNumber(1) var sourceId: Long + @ProtoNumber(1) var sourceId: Long, ) @Serializable data class BackupSource( @ProtoNumber(1) var name: String = "", - @ProtoNumber(2) var sourceId: Long + @ProtoNumber(2) var sourceId: Long, ) { companion object { fun copyFrom(source: Source): BackupSource { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt index 32ab16e873..8cedb9aff5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestore.kt @@ -109,7 +109,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract chapters: List, categories: List, history: List, - tracks: List + tracks: List, ) { val dbManga = backupManager.getMangaFromDatabase(manga) @@ -139,7 +139,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract chapters: List, categories: List, history: List, - tracks: List + tracks: List, ) { try { val fetchedManga = backupManager.fetchManga(source, manga) @@ -161,7 +161,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract chapters: List, categories: List, history: List, - tracks: List + tracks: List, ) { if (!backupManager.restoreChaptersForManga(backupManga, chapters)) { updateChapters(source, backupManga, chapters) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/models/Backup.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/models/Backup.kt index 2766eeecc0..ba965cfa32 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/models/Backup.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/models/Backup.kt @@ -15,7 +15,7 @@ data class Backup( val version: Int? = null, var mangas: MutableList = mutableListOf(), var categories: List<@Contextual Category>? = null, - var extensions: List? = null + var extensions: List? = null, ) { companion object { const val CURRENT_VERSION = 2 @@ -33,5 +33,5 @@ data class MangaObject( var chapters: List<@Contextual Chapter>? = null, var categories: List? = null, var track: List<@Contextual Track>? = null, - var history: List<@Contextual DHistory>? = null + var history: List<@Contextual DHistory>? = null, ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt index 59de4bdf51..0de0f6ab9b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt @@ -47,7 +47,7 @@ class MangaCoverFetcher( private val options: Options, private val coverCache: CoverCache, private val callFactoryLazy: Lazy, - private val diskCacheLazy: Lazy + private val diskCacheLazy: Lazy, ) : Fetcher { // For non-custom cover @@ -273,7 +273,7 @@ class MangaCoverFetcher( class Factory( private val callFactoryLazy: Lazy, - private val diskCacheLazy: Lazy + private val diskCacheLazy: Lazy, ) : Fetcher.Factory { private val coverCache: CoverCache by injectLazy() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaQueries.kt index 5d5f65c364..5eb7030385 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaQueries.kt @@ -42,7 +42,7 @@ interface MangaQueries : DbProvider { .where("${MangaTable.COL_FAVORITE} = 1 AND LOWER(${MangaTable.COL_TITLE}) = ? AND ${MangaTable.COL_SOURCE} != ?") .whereArgs( manga.title.lowercase(), - manga.source, + manga.source ) .limit(1) .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/tables/TrackTable.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/tables/TrackTable.kt index c3b2cff480..5a9a8f239b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/tables/TrackTable.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/tables/TrackTable.kt @@ -73,7 +73,7 @@ object TrackTable { |INSERT INTO $TABLE($COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE) |SELECT $COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE |FROM ${TABLE}_tmp - """.trimMargin() + """.trimMargin() val dropTempTable: String get() = "DROP TABLE ${TABLE}_tmp" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt index f340f63a2f..2f01b89c6e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt @@ -27,7 +27,7 @@ class DownloadCache( private val context: Context, private val provider: DownloadProvider, private val sourceManager: SourceManager, - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) { /** @@ -236,7 +236,7 @@ class DownloadCache( */ private class RootDirectory( val dir: UniFile, - var files: Map = hashMapOf() + var files: Map = hashMapOf(), ) /** @@ -244,7 +244,7 @@ class DownloadCache( */ private class SourceDirectory( val dir: UniFile, - var files: Map = hashMapOf() + var files: Map = hashMapOf(), ) /** @@ -252,7 +252,7 @@ class DownloadCache( */ private class MangaDirectory( val dir: UniFile, - var files: Set = hashSetOf() + var files: Set = hashSetOf(), ) /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index dc23395801..cb025e7dc7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt @@ -30,7 +30,7 @@ import uy.kohesive.injekt.injectLazy */ class DownloadManager( private val context: Context, - private val db: DatabaseHelper = Injekt.get() + private val db: DatabaseHelper = Injekt.get(), ) { private val sourceManager: SourceManager by injectLazy() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadPendingDeleter.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadPendingDeleter.kt index 9625d6b95e..57c78e5f17 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadPendingDeleter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadPendingDeleter.kt @@ -126,7 +126,7 @@ class DownloadPendingDeleter(context: Context) { @Serializable private data class Entry( val chapters: List, - val manga: MangaEntry + val manga: MangaEntry, ) /** @@ -137,7 +137,7 @@ class DownloadPendingDeleter(context: Context) { val id: Long, val url: String, val name: String, - val scanlator: String? = null + val scanlator: String? = null, ) /** @@ -148,7 +148,7 @@ class DownloadPendingDeleter(context: Context) { val id: Long, val url: String, val title: String, - val source: Long + val source: Long, ) /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt index 90d8c802cc..11e1f7898d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt @@ -177,7 +177,9 @@ class DownloadService : Service() { */ private fun listenDownloaderState() { subscriptions += downloadManager.runningRelay - .doOnError { /* Swallow wakelock error */ } + .doOnError { + /* Swallow wakelock error */ + } .subscribe { running -> if (running) { wakeLock.acquireIfNeeded() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadStore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadStore.kt index 22b13d676a..0f4624d3ab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadStore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadStore.kt @@ -20,7 +20,7 @@ import uy.kohesive.injekt.injectLazy */ class DownloadStore( context: Context, - private val sourceManager: SourceManager + private val sourceManager: SourceManager, ) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt index 33b7d8e608..32796dd7d6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt @@ -60,7 +60,7 @@ class Downloader( private val context: Context, private val provider: DownloadProvider, private val cache: DownloadCache, - private val sourceManager: SourceManager + private val sourceManager: SourceManager, ) { private val chapterCache: ChapterCache by injectLazy() @@ -478,7 +478,7 @@ class Downloader( download: Download, mangaDir: UniFile, tmpDir: UniFile, - dirname: String + dirname: String, ) { // Ensure that the chapter folder has all the images. val downloadedImages = tmpDir.listFiles().orEmpty().filterNot { it.name!!.endsWith(".tmp") } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt index af4982bb99..4b7b623c2e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/model/DownloadQueue.kt @@ -11,7 +11,7 @@ import java.util.concurrent.CopyOnWriteArrayList class DownloadQueue( private val store: DownloadStore, - private val queue: MutableList = CopyOnWriteArrayList() + private val queue: MutableList = CopyOnWriteArrayList(), ) : List by queue { private val statusSubject = PublishSubject.create() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index a426680fae..6ed5ffb86a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -77,7 +77,7 @@ class LibraryUpdateService( val preferences: PreferencesHelper = Injekt.get(), val downloadManager: DownloadManager = Injekt.get(), val trackManager: TrackManager = Injekt.get(), - val coverCache: CoverCache = Injekt.get() + val coverCache: CoverCache = Injekt.get(), ) : Service() { private lateinit var wakeLock: PowerManager.WakeLock @@ -310,7 +310,7 @@ class LibraryUpdateService( withUpdateNotification( currentlyUpdatingManga, progressCount, - manga, + manga ) { manga -> try { when { @@ -383,7 +383,7 @@ class LibraryUpdateService( val errorFile = writeErrorFile(failedUpdates) notifier.showUpdateErrorNotification( failedUpdates.size, - errorFile.getUriCompat(this), + errorFile.getUriCompat(this) ) } if (skippedUpdates.isNotEmpty()) { @@ -446,7 +446,7 @@ class LibraryUpdateService( withUpdateNotification( currentlyUpdatingManga, progressCount, - manga, + manga ) { manga -> sourceManager.get(manga.source)?.let { source -> try { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt index 9ffcfdafeb..9d01905f37 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt @@ -461,7 +461,7 @@ class NotificationReceiver : BroadcastReceiver() { context: Context, manga: Manga, chapters: Array, - groupId: Int + groupId: Int, ): PendingIntent { val newIntent = Intent(context, NotificationReceiver::class.java).apply { action = ACTION_MARK_AS_READ @@ -483,7 +483,7 @@ class NotificationReceiver : BroadcastReceiver() { context: Context, manga: Manga, chapters: Array, - groupId: Int + groupId: Int, ): PendingIntent { val newIntent = Intent(context, NotificationReceiver::class.java).apply { action = ACTION_DOWNLOAD_CHAPTER diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt index e7cae48b89..ddd8da2ce9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt @@ -87,7 +87,7 @@ object Notifications { "backup_restore_complete_channel", "library_channel", "library_progress_channel", - "updates_ext_channel", + "updates_ext_channel" ) /** @@ -115,7 +115,7 @@ object Notifications { }, buildNotificationChannelGroup(GROUP_APK_UPDATES) { setName(context.getString(R.string.label_recent_updates)) - }, + } ) ) @@ -181,7 +181,7 @@ object Notifications { buildNotificationChannel(CHANNEL_EXTENSIONS_UPDATE, IMPORTANCE_DEFAULT) { setGroup(GROUP_APK_UPDATES) setName(context.getString(R.string.channel_ext_updates)) - }, + } ) ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt index be6af8cca4..4b55ccb1f7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt @@ -20,7 +20,7 @@ import java.io.File import java.io.InputStream class ImageSaver( - val context: Context + val context: Context, ) { @SuppressLint("InlinedApi") @@ -83,18 +83,18 @@ class ImageSaver( sealed class Image( open val name: String, - open val location: Location + open val location: Location, ) { data class Cover( val bitmap: Bitmap, override val name: String, - override val location: Location + override val location: Location, ) : Image(name, location) data class Page( val inputStream: () -> InputStream, override val name: String, - override val location: Location + override val location: Location, ) : Image(name, location) val data: () -> InputStream diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt index f05a0dc06b..b8af832c28 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistApi.kt @@ -43,7 +43,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { | status |} |} - |""".trimMargin() + | + """.trimMargin() val payload = buildJsonObject { put("query", query) putJsonObject("variables") { @@ -84,7 +85,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { |progress |} |} - |""".trimMargin() + | + """.trimMargin() val payload = buildJsonObject { put("query", query) putJsonObject("variables") { @@ -127,7 +129,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { |} |} |} - |""".trimMargin() + | + """.trimMargin() val payload = buildJsonObject { put("query", query) putJsonObject("variables") { @@ -193,7 +196,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { |} |} |} - |""".trimMargin() + | + """.trimMargin() val payload = buildJsonObject { put("query", query) putJsonObject("variables") { @@ -238,7 +242,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { |} |} |} - |""".trimMargin() + | + """.trimMargin() val payload = buildJsonObject { put("query", query) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistModels.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistModels.kt index 93f09fc048..41cd2fe8ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistModels.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/AnilistModels.kt @@ -16,7 +16,7 @@ data class ALManga( val format: String, val publishing_status: String, val start_date_fuzzy: Long, - val total_chapters: Int + val total_chapters: Int, ) { fun toTrack() = TrackSearch.create(TrackManager.ANILIST).apply { @@ -46,7 +46,7 @@ data class ALUserManga( val chapters_read: Int, val start_date_fuzzy: Long, val completed_date_fuzzy: Long, - val manga: ALManga + val manga: ALManga, ) { fun toTrack() = Track.create(TrackManager.ANILIST).apply { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/OAuth.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/OAuth.kt index d6de7e1a94..49067070f4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/OAuth.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/OAuth.kt @@ -7,7 +7,7 @@ data class OAuth( val access_token: String, val token_type: String, val expires: Long, - val expires_in: Long + val expires_in: Long, ) { fun isExpired() = System.currentTimeMillis() > expires diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Avatar.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Avatar.kt index d0c2ffa457..1cea3438dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Avatar.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Avatar.kt @@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable data class Avatar( val large: String? = "", val medium: String? = "", - val small: String? = "" + val small: String? = "", ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Collection.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Collection.kt index 297a012163..301167366f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Collection.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Collection.kt @@ -12,5 +12,5 @@ data class Collection( val status: Status? = Status(), val tag: List? = listOf(), val user: User? = User(), - val vol_status: Int? = 0 + val vol_status: Int? = 0, ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/OAuth.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/OAuth.kt index 774438a5e7..25776d3416 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/OAuth.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/OAuth.kt @@ -9,7 +9,7 @@ data class OAuth( val created_at: Long = System.currentTimeMillis() / 1000, val expires_in: Long, val refresh_token: String?, - val user_id: Long? + val user_id: Long?, ) { // Access token refresh before expired diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Status.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Status.kt index a75f463892..f69bac3f5e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Status.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Status.kt @@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable data class Status( val id: Int? = 0, val name: String? = "", - val type: String? = "" + val type: String? = "", ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/User.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/User.kt index 95c1f6dd2a..514be8fb0a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/User.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/User.kt @@ -10,5 +10,5 @@ data class User( val sign: String? = "", val url: String? = "", val usergroup: Int? = 0, - val username: String? = "" + val username: String? = "", ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/job/DelayedTrackingStore.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/job/DelayedTrackingStore.kt index e0c968f08f..86cfc89b14 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/job/DelayedTrackingStore.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/job/DelayedTrackingStore.kt @@ -39,7 +39,7 @@ class DelayedTrackingStore(context: Context) { DelayedTrackingItem( trackId = it.key.toLong(), mangaId = mangaId.toLong(), - lastChapterRead = lastChapterRead.toFloat(), + lastChapterRead = lastChapterRead.toFloat() ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt index 29e148461e..48c9f33f5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt @@ -137,7 +137,7 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) "X-Algolia-Application-Id", algoliaAppId, "X-Algolia-API-Key", - key, + key ), body = jsonObject.toString().toRequestBody(jsonMime) ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/OAuth.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/OAuth.kt index 5cd28c4962..33dade31cc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/OAuth.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/OAuth.kt @@ -8,7 +8,7 @@ data class OAuth( val token_type: String, val created_at: Long, val expires_in: Long, - val refresh_token: String? + val refresh_token: String?, ) { fun isExpired() = (System.currentTimeMillis() / 1000) > (created_at + expires_in - 3600) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaModels.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaModels.kt index 85b1e89b84..a5732ba077 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaModels.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaModels.kt @@ -15,7 +15,7 @@ data class SeriesDto( val booksUnreadCount: Int, val booksInProgressCount: Int, val metadata: SeriesMetadataDto, - val booksMetadata: BookMetadataAggregationDto + val booksMetadata: BookMetadataAggregationDto, ) @Serializable @@ -38,7 +38,7 @@ data class SeriesMetadataDto( val genres: Set, val genresLock: Boolean, val tags: Set, - val tagsLock: Boolean + val tagsLock: Boolean, ) @Serializable @@ -49,13 +49,13 @@ data class BookMetadataAggregationDto( val summaryNumber: String, val created: String, - val lastModified: String + val lastModified: String, ) @Serializable data class AuthorDto( val name: String, - val role: String + val role: String, ) @Serializable @@ -75,7 +75,7 @@ data class ReadListDto( val bookIds: List, val createdDate: String, val lastModifiedDate: String, - val filtered: Boolean + val filtered: Boolean, ) @Serializable @@ -92,7 +92,7 @@ data class ReadProgressDto( booksUnreadCount, booksInProgressCount, lastReadContinuousIndex.toFloat(), - booksCount.toFloat(), + booksCount.toFloat() ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/OAuth.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/OAuth.kt index 590e6f225e..17cd1c3efa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/OAuth.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/OAuth.kt @@ -8,7 +8,7 @@ data class OAuth( val access_token: String, val token_type: String, val created_at: Long = System.currentTimeMillis(), - val expires_in: Long + val expires_in: Long, ) { fun isExpired() = System.currentTimeMillis() > created_at + (expires_in * 1000) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/OAuth.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/OAuth.kt index 9987891974..16b01db2f1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/OAuth.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/OAuth.kt @@ -8,7 +8,7 @@ data class OAuth( val token_type: String, val created_at: Long, val expires_in: Long, - val refresh_token: String? + val refresh_token: String?, ) { // Access token lives 1 day diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt index d0d2a03cbb..786a38fd32 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt @@ -47,12 +47,12 @@ internal class AppUpdateNotifier(private val context: Context) { addAction( android.R.drawable.stat_sys_download_done, context.getString(R.string.action_download), - updateIntent, + updateIntent ) addAction( R.drawable.ic_info_24dp, context.getString(R.string.whats_new), - releaseInfoIntent, + releaseInfoIntent ) } notificationBuilder.show() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/GithubRelease.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/GithubRelease.kt index 068fac3f6e..2d3b2e6323 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/GithubRelease.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/GithubRelease.kt @@ -12,7 +12,7 @@ data class GithubRelease( @SerialName("tag_name") val version: String, @SerialName("body") val info: String, @SerialName("html_url") val releaseLink: String, - @SerialName("assets") private val assets: List + @SerialName("assets") private val assets: List, ) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt index ccd92d52ec..ec76331044 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionManager.kt @@ -36,7 +36,7 @@ import uy.kohesive.injekt.api.get */ class ExtensionManager( private val context: Context, - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt index 87d1de650a..06af026c14 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt @@ -125,6 +125,6 @@ private data class ExtensionJsonObject( private data class ExtensionSourceJsonObject( val name: String, val id: Long, - val baseUrl: String + val baseUrl: String, ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt index 44b1884ce8..c8e051a935 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt @@ -28,7 +28,7 @@ sealed class Extension { val icon: Drawable?, val hasUpdate: Boolean = false, val isObsolete: Boolean = false, - val isUnofficial: Boolean = false + val isUnofficial: Boolean = false, ) : Extension() data class Available( @@ -42,7 +42,7 @@ sealed class Extension { override val hasChangelog: Boolean, val sources: List, val apkName: String, - val iconUrl: String + val iconUrl: String, ) : Extension() data class Untrusted( @@ -61,5 +61,5 @@ sealed class Extension { data class AvailableExtensionSources( val name: String, val id: Long, - val baseUrl: String + val baseUrl: String, ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt index f470caa546..2b8301fe9d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallService.kt @@ -72,7 +72,7 @@ class ExtensionInstallService : Service() { context: Context, downloadId: Long, uri: Uri, - installer: PreferenceValues.ExtensionInstaller + installer: PreferenceValues.ExtensionInstaller, ): Intent { return Intent(context, ExtensionInstallService::class.java) .setDataAndType(uri, ExtensionInstaller.APK_MIME) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt b/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt index 9a6d5cd2ab..6028bae53f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt @@ -26,7 +26,7 @@ fun OkHttpClient.Builder.dohCloudflare() = dns( InetAddress.getByName("2606:4700:4700::1111"), InetAddress.getByName("2606:4700:4700::1001"), InetAddress.getByName("2606:4700:4700::0064"), - InetAddress.getByName("2606:4700:4700::6400"), + InetAddress.getByName("2606:4700:4700::6400") ) .build() ) @@ -38,7 +38,7 @@ fun OkHttpClient.Builder.dohGoogle() = dns( InetAddress.getByName("8.8.4.4"), InetAddress.getByName("8.8.8.8"), InetAddress.getByName("2001:4860:4860::8888"), - InetAddress.getByName("2001:4860:4860::8844"), + InetAddress.getByName("2001:4860:4860::8844") ) .build() ) @@ -52,7 +52,7 @@ fun OkHttpClient.Builder.dohAdGuard() = dns( InetAddress.getByName("94.140.14.140"), InetAddress.getByName("94.140.14.141"), InetAddress.getByName("2a10:50c0::1:ff"), - InetAddress.getByName("2a10:50c0::2:ff"), + InetAddress.getByName("2a10:50c0::2:ff") ) .build() ) @@ -64,7 +64,7 @@ fun OkHttpClient.Builder.dohQuad9() = dns( InetAddress.getByName("9.9.9.9"), InetAddress.getByName("149.112.112.112"), InetAddress.getByName("2620:fe::fe"), - InetAddress.getByName("2620:fe::9"), + InetAddress.getByName("2620:fe::9") ) .build() ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/Requests.kt b/app/src/main/java/eu/kanade/tachiyomi/network/Requests.kt index 3d3b88b548..8931b90b9e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/Requests.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/Requests.kt @@ -14,7 +14,7 @@ private val DEFAULT_BODY: RequestBody = FormBody.Builder().build() fun GET( url: String, headers: Headers = DEFAULT_HEADERS, - cache: CacheControl = DEFAULT_CACHE_CONTROL + cache: CacheControl = DEFAULT_CACHE_CONTROL, ): Request { return Request.Builder() .url(url) @@ -27,7 +27,7 @@ fun POST( url: String, headers: Headers = DEFAULT_HEADERS, body: RequestBody = DEFAULT_BODY, - cache: CacheControl = DEFAULT_CACHE_CONTROL + cache: CacheControl = DEFAULT_CACHE_CONTROL, ): Request { return Request.Builder() .url(url) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt b/app/src/main/java/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt index 0a84641436..b697a9f167 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt @@ -135,7 +135,7 @@ class CloudflareInterceptor(private val context: Context) : Interceptor { errorCode: Int, description: String?, failingUrl: String, - isMainFrame: Boolean + isMainFrame: Boolean, ) { if (isMainFrame) { if (errorCode in ERROR_CODES) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index e2a8a92324..27b2fe73b4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -186,7 +186,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour artist = obj["artist"]?.jsonPrimitive?.contentOrNull ?: manga.artist, description = obj["description"]?.jsonPrimitive?.contentOrNull ?: manga.description, genres = obj["genre"]?.jsonArray?.map { it.jsonPrimitive.content } ?: manga.genres, - status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status, + status = obj["status"]?.jsonPrimitive?.intOrNull ?: manga.status ) } else { manga @@ -353,5 +353,5 @@ private val WHITESPACE_CHARS = arrayOf( '\u2029', '\u202F', '\u205F', - '\u3000', + '\u3000' ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/model/Page.kt b/app/src/main/java/eu/kanade/tachiyomi/source/model/Page.kt index 05a6383756..8bf5d76327 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/model/Page.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/model/Page.kt @@ -12,7 +12,7 @@ open class Page( val index: Int, val url: String = "", var imageUrl: String? = null, - @Transient var uri: Uri? = null // Deprecated but can't be deleted due to extensions + @Transient var uri: Uri? = null, // Deprecated but can't be deleted due to extensions ) : ProgressListener { val number: Int diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/OneWayFadeChangeHandler.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/OneWayFadeChangeHandler.kt index 7f0ddc9075..1318c75f57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/OneWayFadeChangeHandler.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/OneWayFadeChangeHandler.kt @@ -25,7 +25,7 @@ class OneWayFadeChangeHandler : FadeChangeHandler { from: View?, to: View?, isPush: Boolean, - toAddedToContainer: Boolean + toAddedToContainer: Boolean, ): Animator { val animator = AnimatorSet() if (to != null) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/SearchableNucleusController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/SearchableNucleusController.kt index a0251c25ef..cc84823224 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/SearchableNucleusController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/SearchableNucleusController.kt @@ -21,8 +21,7 @@ import reactivecircus.flowbinding.appcompat.queryTextEvents /** * Implementation of the NucleusController that has a built-in ViewSearch */ -abstract class SearchableNucleusController> -(bundle: Bundle? = null) : NucleusController(bundle) { +abstract class SearchableNucleusController>(bundle: Bundle? = null) : NucleusController(bundle) { enum class SearchViewState { LOADING, LOADED, COLLAPSING, FOCUSED } @@ -45,7 +44,7 @@ abstract class SearchableNucleusController() { var actionLabel: String? = null @@ -43,7 +43,7 @@ data class ExtensionGroupItem( adapter: FlexibleAdapter>, holder: ExtensionGroupHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionItem.kt index cd0059f5c0..5e895f6b5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionItem.kt @@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.source.CatalogueSource data class ExtensionItem( val extension: Extension, val header: ExtensionGroupItem? = null, - val installStep: InstallStep = InstallStep.Idle + val installStep: InstallStep = InstallStep.Idle, ) : AbstractSectionableItem(header) { @@ -44,7 +44,7 @@ data class ExtensionItem( adapter: FlexibleAdapter>, holder: ExtensionHolder, position: Int, - payloads: List? + payloads: List?, ) { if (payloads == null || payloads.isEmpty()) { holder.bind(this) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionPresenter.kt index f9cef42085..729edc4eeb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionPresenter.kt @@ -26,7 +26,7 @@ private typealias ExtensionTuple = */ open class ExtensionPresenter( private val extensionManager: ExtensionManager = Injekt.get(), - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) : BasePresenter() { private var extensions = emptyList() @@ -64,7 +64,7 @@ open class ExtensionPresenter( val items = mutableListOf() val updatesSorted = installed.filter { it.hasUpdate && (showNsfwSources || !it.isNsfw) } - .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, { it.name })) + .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name }) val installedSorted = installed.filter { !it.hasUpdate && (showNsfwSources || !it.isNsfw) } .sortedWith( @@ -72,7 +72,7 @@ open class ExtensionPresenter( .thenBy(String.CASE_INSENSITIVE_ORDER) { it.name } ) - val untrustedSorted = untrusted.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, { it.name })) + val untrustedSorted = untrusted.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name }) val availableSorted = available // Filter out already installed extensions and disabled languages @@ -82,7 +82,7 @@ open class ExtensionPresenter( avail.lang in activeLangs && (showNsfwSources || !avail.isNsfw) } - .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, { it.name })) + .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name }) if (updatesSorted.isNotEmpty()) { val header = ExtensionGroupItem(context.getString(R.string.ext_updates_pending), updatesSorted.size, true) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesPresenter.kt index 3e3147c669..1ac5af7664 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesPresenter.kt @@ -7,7 +7,7 @@ import uy.kohesive.injekt.api.get class SourcePreferencesPresenter( val sourceId: Long, - sourceManager: SourceManager = Injekt.get() + sourceManager: SourceManager = Injekt.get(), ) : BasePresenter() { val source = sourceManager.get(sourceId) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaHolder.kt index 7e2c73c7b6..40d615133f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaHolder.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.databinding.SourceListItemBinding class MigrationMangaHolder( view: View, - private val adapter: MigrationMangaAdapter + private val adapter: MigrationMangaAdapter, ) : FlexibleViewHolder(view, adapter) { private val binding = SourceListItemBinding.bind(view) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaItem.kt index 3af0924cd7..6ad16471bb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaItem.kt @@ -22,7 +22,7 @@ class MigrationMangaItem(val manga: Manga) : AbstractFlexibleItem>, holder: MigrationMangaHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } 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 a2cc2800e9..8e10fd7e64 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 @@ -10,7 +10,7 @@ import uy.kohesive.injekt.api.get class MigrationMangaPresenter( private val sourceId: Long, - private val db: DatabaseHelper = Injekt.get() + private val db: DatabaseHelper = Injekt.get(), ) : BasePresenter() { override fun onCreate(savedState: Bundle?) { 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 fef73116ba..ec2e998f01 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 @@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController import uy.kohesive.injekt.injectLazy class SearchController( - private var manga: Manga? = null + private var manga: Manga? = null, ) : GlobalSearchController(manga?.title) { private var newManga: Manga? = null @@ -121,7 +121,7 @@ class SearchController( } (targetController as? SearchController)?.migrateManga(manga, newManga) } - .setNegativeButton(R.string.copy) { _, _, -> + .setNegativeButton(R.string.copy) { _, _ -> if (callingController != null) { if (callingController.javaClass == SourceSearchController::class.java) { router.popController(callingController) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt index 84bc76cf48..73b42a3f56 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt @@ -27,7 +27,7 @@ import java.util.Date class SearchPresenter( initialQuery: String? = "", - private val manga: Manga + private val manga: Manga, ) : GlobalSearchPresenter(initialQuery) { private val replacingMangaRelay = BehaviorRelay.create>() @@ -88,7 +88,7 @@ class SearchPresenter( sourceChapters: List, prevManga: Manga, manga: Manga, - replace: Boolean + replace: Boolean, ) { val flags = preferences.migrateFlags().get() val migrateChapters = diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchController.kt index 2b699b5512..dba7e0209f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchController.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController import eu.kanade.tachiyomi.ui.browse.source.browse.SourceItem class SourceSearchController( - bundle: Bundle + bundle: Bundle, ) : BrowseSourceController(bundle) { constructor(manga: Manga? = null, source: CatalogueSource, searchQuery: String? = null) : this( 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 744046a013..5b65ae1d67 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 @@ -20,7 +20,7 @@ import java.util.Locale class MigrationSourcesPresenter( private val sourceManager: SourceManager = Injekt.get(), - private val db: DatabaseHelper = Injekt.get() + private val db: DatabaseHelper = Injekt.get(), ) : BasePresenter() { private val preferences: PreferencesHelper by injectLazy() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SelectionHeader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SelectionHeader.kt index e617a7fdb8..b6e187889c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SelectionHeader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SelectionHeader.kt @@ -38,7 +38,7 @@ class SelectionHeader : AbstractHeaderItem() { adapter: FlexibleAdapter>, holder: Holder, position: Int, - payloads: List? + payloads: List?, ) { // Intentionally empty } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceItem.kt index 08dd118469..90fd1ebb53 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceItem.kt @@ -41,7 +41,7 @@ data class SourceItem(val source: Source, val mangaCount: Int, val header: Selec adapter: FlexibleAdapter>, holder: SourceHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt index b94e4b5dd6..a9d02b0145 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt @@ -35,7 +35,7 @@ data class LangItem(val code: String) : AbstractHeaderItem() { adapter: FlexibleAdapter>, holder: LangHolder, position: Int, - payloads: MutableList + payloads: MutableList, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt index 5360f582a6..bb0f45fabc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt @@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.source.CatalogueSource data class SourceItem( val source: CatalogueSource, val header: LangItem? = null, - val isPinned: Boolean = false + val isPinned: Boolean = false, ) : AbstractSectionableItem(header) { @@ -33,7 +33,7 @@ data class SourceItem( adapter: FlexibleAdapter>, holder: SourceHolder, position: Int, - payloads: MutableList + payloads: MutableList, ) { holder.bind(this) } 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 f08f0134dc..40858b052c 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 @@ -21,7 +21,7 @@ import java.util.TreeMap */ class SourcePresenter( val sourceManager: SourceManager = Injekt.get(), - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) : BasePresenter() { var sources = getEnabledSources() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt index 87cacb73dd..4839997250 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt @@ -62,7 +62,7 @@ open class BrowseSourcePresenter( private val sourceManager: SourceManager = Injekt.get(), private val db: DatabaseHelper = Injekt.get(), private val prefs: PreferencesHelper = Injekt.get(), - private val coverCache: CoverCache = Injekt.get() + private val coverCache: CoverCache = Injekt.get(), ) : BasePresenter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceComfortableGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceComfortableGridHolder.kt index f7436d0e6f..b285f9f1ad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceComfortableGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceComfortableGridHolder.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause */ class SourceComfortableGridHolder( override val binding: SourceComfortableGridItemBinding, - adapter: FlexibleAdapter<*> + adapter: FlexibleAdapter<*>, ) : SourceHolder(binding.root, adapter) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceCompactGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceCompactGridHolder.kt index ba2a57aaf2..02a010988d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceCompactGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceCompactGridHolder.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause */ class SourceCompactGridHolder( override val binding: SourceCompactGridItemBinding, - adapter: FlexibleAdapter<*> + adapter: FlexibleAdapter<*>, ) : SourceHolder(binding.root, adapter) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt index 3102d7d1e2..aae8ccbfee 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.widget.sheet.BaseBottomSheetDialog class SourceFilterSheet( activity: Activity, private val onFilterClicked: () -> Unit, - private val onResetClicked: () -> Unit + private val onResetClicked: () -> Unit, ) : BaseBottomSheetDialog(activity) { private var filterNavView: FilterNavigationView = FilterNavigationView(activity) @@ -36,7 +36,7 @@ class SourceFilterSheet( class FilterNavigationView @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : SimpleNavigationView(context, attrs) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt index a5cb700bce..72eb7f0e23 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt @@ -25,7 +25,7 @@ class SourceItem(val manga: Manga, private val displayMode: Preference> + adapter: FlexibleAdapter>, ): SourceHolder<*> { return when (displayMode.get()) { DisplayModeSetting.COMPACT_GRID, DisplayModeSetting.COVER_ONLY_GRID -> { @@ -44,7 +44,7 @@ class SourceItem(val manga: Manga, private val displayMode: Preference>, holder: SourceHolder<*>, position: Int, - payloads: List? + payloads: List?, ) { holder.onSetValues(manga) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchCardItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchCardItem.kt index 9c3637a6d2..0a03eaf34d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchCardItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchCardItem.kt @@ -22,7 +22,7 @@ class GlobalSearchCardItem(val manga: Manga) : AbstractFlexibleItem>, holder: GlobalSearchCardHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(manga) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt index 3a3daef780..054540267f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt @@ -28,7 +28,7 @@ import uy.kohesive.injekt.injectLazy */ open class GlobalSearchController( protected val initialQuery: String? = null, - protected val extensionFilter: String? = null + protected val extensionFilter: String? = null, ) : SearchableNucleusController(), GlobalSearchCardAdapter.OnMangaClickListener, GlobalSearchAdapter.OnTitleClickListener { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchItem.kt index fbfb28bc2b..b2df301c46 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchItem.kt @@ -43,7 +43,7 @@ class GlobalSearchItem(val source: CatalogueSource, val results: List>, holder: GlobalSearchHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt index ab80828d3b..b22330e531 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt @@ -39,7 +39,7 @@ open class GlobalSearchPresenter( val initialExtensionFilter: String? = null, val sourceManager: SourceManager = Injekt.get(), val db: DatabaseHelper = Injekt.get(), - val preferences: PreferencesHelper = Injekt.get() + val preferences: PreferencesHelper = Injekt.get(), ) : BasePresenter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt index cdcde2a8ba..27578c201e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt @@ -47,7 +47,7 @@ class CategoryItem(val category: Category) : AbstractFlexibleItem>, holder: CategoryHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(category) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryPresenter.kt index 1c6aab6b6a..2b5d2002fc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryPresenter.kt @@ -13,7 +13,7 @@ import uy.kohesive.injekt.api.get * Presenter of [CategoryController]. Used to manage the categories of the library. */ class CategoryPresenter( - private val db: DatabaseHelper = Injekt.get() + private val db: DatabaseHelper = Injekt.get(), ) : BasePresenter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt index 51db5949a3..5df04fddbe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt @@ -197,7 +197,9 @@ class DownloadController : onUpdateDownloadedPages(download) } Download.State.ERROR -> unsubscribeProgress(download) - else -> { /* unused */ } + else -> { + /* unused */ + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt index b69cc07bda..b4103a7e55 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderItem.kt @@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.R data class DownloadHeaderItem( val id: Long, val name: String, - val size: Int + val size: Int, ) : AbstractExpandableHeaderItem() { override fun getLayoutRes(): Int { @@ -19,7 +19,7 @@ data class DownloadHeaderItem( override fun createViewHolder( view: View, - adapter: FlexibleAdapter> + adapter: FlexibleAdapter>, ): DownloadHeaderHolder { return DownloadHeaderHolder(view, adapter) } @@ -28,7 +28,7 @@ data class DownloadHeaderItem( adapter: FlexibleAdapter>, holder: DownloadHeaderHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadItem.kt index 3393d7c12d..783ec061fb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadItem.kt @@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.data.download.model.Download class DownloadItem( val download: Download, - header: DownloadHeaderItem + header: DownloadHeaderItem, ) : AbstractSectionableItem(header) { override fun getLayoutRes(): Int { @@ -25,7 +25,7 @@ class DownloadItem( */ override fun createViewHolder( view: View, - adapter: FlexibleAdapter> + adapter: FlexibleAdapter>, ): DownloadHolder { return DownloadHolder(view, adapter as DownloadAdapter) } @@ -42,7 +42,7 @@ class DownloadItem( adapter: FlexibleAdapter>, holder: DownloadHolder, position: Int, - payloads: MutableList + payloads: MutableList, ) { holder.bind(download) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt index 6c7802dc9a..cd03f31283 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/ChangeMangaCategoriesDialog.kt @@ -25,7 +25,7 @@ class ChangeMangaCategoriesDialog(bundle: Bundle? = null) : target: T, mangas: List, categories: List, - preselected: Array + preselected: Array, ) : this() { this.mangas = mangas this.categories = categories diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/DeleteLibraryMangasDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/DeleteLibraryMangasDialog.kt index 45a6dfbda0..0139e8f612 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/DeleteLibraryMangasDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/DeleteLibraryMangasDialog.kt @@ -24,7 +24,7 @@ class DeleteLibraryMangasDialog(bundle: Bundle? = null) : val items = when (canDeleteChapters) { true -> listOf( R.string.manga_from_library, - R.string.downloaded_chapters, + R.string.downloaded_chapters ) false -> listOf(R.string.manga_from_library) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt index 6a18ef897b..c472a76250 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt @@ -21,7 +21,7 @@ import uy.kohesive.injekt.api.get */ class LibraryAdapter( private val controller: LibraryController, - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) : RecyclerViewPagerAdapter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryComfortableGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryComfortableGridHolder.kt index 3f63340170..2c3c7fcfea 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryComfortableGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryComfortableGridHolder.kt @@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause */ class LibraryComfortableGridHolder( override val binding: SourceComfortableGridItemBinding, - adapter: FlexibleAdapter> + adapter: FlexibleAdapter>, ) : LibraryHolder(binding.root, adapter) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCompactGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCompactGridHolder.kt index 4e753d5273..ea699ec7bc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCompactGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCompactGridHolder.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause class LibraryCompactGridHolder( override val binding: SourceCompactGridItemBinding, adapter: FlexibleAdapter<*>, - private val coverOnly: Boolean + private val coverOnly: Boolean, ) : LibraryHolder(binding.root, adapter) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 095c47eb6c..2dc5aed8c1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -51,7 +51,7 @@ import java.util.concurrent.TimeUnit class LibraryController( bundle: Bundle? = null, - private val preferences: PreferencesHelper = Injekt.get() + private val preferences: PreferencesHelper = Injekt.get(), ) : SearchableNucleusController(bundle), RootController, TabbedController, @@ -282,7 +282,7 @@ class LibraryController( EmptyView.Action(R.string.getting_started_guide, R.drawable.ic_help_24dp) { activity?.openInBrowser("https://tachiyomi.org/help/guides/getting-started") } - ), + ) ) (activity as? MainActivity)?.ready = true } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHolder.kt index d6e054d233..3d36b56cf0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHolder.kt @@ -14,7 +14,7 @@ import eu.davidea.viewholders.FlexibleViewHolder abstract class LibraryHolder( view: View, - adapter: FlexibleAdapter<*> + adapter: FlexibleAdapter<*>, ) : FlexibleViewHolder(view, adapter) { abstract val binding: VB diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt index e2e0e50a5d..c14b1ee7e6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt @@ -19,7 +19,7 @@ import uy.kohesive.injekt.api.get class LibraryItem( val manga: LibraryManga, private val shouldSetFromCategory: Preference, - private val defaultLibraryDisplayMode: Preference + private val defaultLibraryDisplayMode: Preference, ) : AbstractFlexibleItem>(), IFilterable { @@ -68,7 +68,7 @@ class LibraryItem( adapter: FlexibleAdapter>, holder: LibraryHolder<*>, position: Int, - payloads: List? + payloads: List?, ) { holder.onSetValues(this) } 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 a1dd481b40..61f9941ac0 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 @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.databinding.SourceListItemBinding */ class LibraryListHolder( private val view: View, - private val adapter: FlexibleAdapter<*> + private val adapter: FlexibleAdapter<*>, ) : LibraryHolder(view, adapter) { override val binding = SourceListItemBinding.bind(view) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index f4068a6015..3b268ff648 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -53,7 +53,7 @@ class LibraryPresenter( private val coverCache: CoverCache = Injekt.get(), private val sourceManager: SourceManager = Injekt.get(), private val downloadManager: DownloadManager = Injekt.get(), - private val trackManager: TrackManager = Injekt.get() + private val trackManager: TrackManager = Injekt.get(), ) : BasePresenter() { private val context = preferences.context diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt index bf7afb633e..ba8925a54d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySettingsSheet.kt @@ -23,7 +23,7 @@ import uy.kohesive.injekt.injectLazy class LibrarySettingsSheet( router: Router, private val trackManager: TrackManager = Injekt.get(), - onGroupClickListener: (ExtendedNavigationView.Group) -> Unit + onGroupClickListener: (ExtendedNavigationView.Group) -> Unit, ) : TabbedBottomSheetDialog(router.activity!!) { val filters: Filter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index b11b2e1bcb..0f2ad1d9b3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -204,7 +204,7 @@ class MainActivity : BaseActivity() { from: Controller?, isPush: Boolean, container: ViewGroup, - handler: ControllerChangeHandler + handler: ControllerChangeHandler, ) { syncActivityViewWithController(to, from, isPush) } @@ -214,7 +214,7 @@ class MainActivity : BaseActivity() { from: Controller?, isPush: Boolean, container: ViewGroup, - handler: ControllerChangeHandler + handler: ControllerChangeHandler, ) { } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index d4d37da6fe..45d32ebdad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -425,7 +425,7 @@ class MangaController : when (item.itemId) { R.id.action_share -> shareManga() R.id.download_next, R.id.download_next_5, R.id.download_next_10, - R.id.download_custom, R.id.download_unread, R.id.download_all + R.id.download_custom, R.id.download_unread, R.id.download_all, -> downloadChapters(item.itemId) R.id.action_edit_categories -> onCategoriesClick() @@ -532,7 +532,7 @@ class MangaController : if (duplicateManga != null) { showAddDuplicateDialog( manga, - duplicateManga, + duplicateManga ) } else { addToLibrary(manga) @@ -545,11 +545,11 @@ class MangaController : val source = sourceManager.getOrStub(libraryManga.source) MaterialAlertDialogBuilder(it).apply { setMessage(activity?.getString(R.string.confirm_manga_add_duplicate, source.name)) - setPositiveButton(activity?.getString(R.string.action_add)) { _, _, -> + setPositiveButton(activity?.getString(R.string.action_add)) { _, _ -> addToLibrary(newManga) } - setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _, -> } - setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _, -> + setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _ -> } + setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _ -> router.pushController(MangaController(libraryManga).withFadeTransaction()) } setCancelable(true) @@ -703,7 +703,7 @@ class MangaController : previousController.search(query) } is UpdatesController, - is HistoryController -> { + is HistoryController, -> { // Manually navigate to LibraryController router.handleBack() (router.activity as MainActivity).setSelectedNavItem(R.id.nav_library) @@ -960,7 +960,7 @@ class MangaController : intent.apply { putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true) }, - activityOptions.toBundle(), + activityOptions.toBundle() ) } else { startActivity(intent) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt index 0516370f60..5fd1b6fefa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt @@ -66,7 +66,7 @@ class MangaPresenter( private val db: DatabaseHelper = Injekt.get(), private val trackManager: TrackManager = Injekt.get(), private val downloadManager: DownloadManager = Injekt.get(), - private val coverCache: CoverCache = Injekt.get() + private val coverCache: CoverCache = Injekt.get(), ) : BasePresenter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt index 9275a11ac3..4a4c746729 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt @@ -15,7 +15,7 @@ import java.util.Date class ChapterHolder( view: View, - private val adapter: ChaptersAdapter + private val adapter: ChaptersAdapter, ) : BaseChapterHolder(view, adapter) { private val binding = ChaptersItemBinding.bind(view) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt index 02713a0ffb..d63f7d602d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt @@ -26,7 +26,7 @@ class ChapterItem(chapter: Chapter, val manga: Manga) : adapter: FlexibleAdapter>, holder: ChapterHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this, manga) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt index d96ff53254..2a513563c1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt @@ -13,7 +13,7 @@ import java.text.DecimalFormatSymbols class ChaptersAdapter( controller: MangaController, - context: Context + context: Context, ) : BaseChaptersAdapter(controller) { private val preferences: PreferencesHelper by injectLazy() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSettingsSheet.kt index 4593eaa4a3..35f55d9cef 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersSettingsSheet.kt @@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog class ChaptersSettingsSheet( private val router: Router, private val presenter: MangaPresenter, - private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit + private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit, ) : TabbedBottomSheetDialog(router.activity!!) { val filters = Filter(router.activity!!) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaChaptersHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaChaptersHeaderAdapter.kt index 4ae569a63e..0ee0493429 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaChaptersHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaChaptersHeaderAdapter.kt @@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.onEach import reactivecircus.flowbinding.android.view.clicks class MangaChaptersHeaderAdapter( - private val controller: MangaController + private val controller: MangaController, ) : RecyclerView.Adapter() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterHolder.kt index 1241d02cad..c2e9f68a14 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterHolder.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.util.view.popupMenu open class BaseChapterHolder( view: View, - private val adapter: BaseChaptersAdapter<*> + private val adapter: BaseChaptersAdapter<*>, ) : FlexibleViewHolder(view, adapter) { fun onDownloadClick(view: View, position: Int) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterItem.kt index 04aee7d558..2be19f9c27 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/base/BaseChapterItem.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.source.model.Page abstract class BaseChapterItem>( val chapter: Chapter, - header: H? = null + header: H? = null, ) : AbstractSectionableItem(header), Chapter by chapter { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt index 338481881f..e46cebcb28 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.databinding.TrackSearchItemBinding class TrackSearchAdapter( private val currentTrackUrl: String?, - private val onSelectionChanged: (TrackSearch?) -> Unit + private val onSelectionChanged: (TrackSearch?) -> Unit, ) : RecyclerView.Adapter() { var selectedItemPosition = -1 set(value) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt index 9cbff4f901..e918ca6cd2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt @@ -45,7 +45,7 @@ class TrackSearchDialog : DialogController { constructor( target: MangaController, _service: TrackService, - _currentTrackUrl: String? + _currentTrackUrl: String?, ) : super(bundleOf(KEY_SERVICE to _service.id, KEY_CURRENT_URL to _currentTrackUrl)) { targetController = target service = _service diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchHolder.kt index beabf2ebe3..cfd9807f62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchHolder.kt @@ -10,7 +10,7 @@ import java.util.Locale class TrackSearchHolder( private val binding: TrackSearchItemBinding, - private val adapter: TrackSearchAdapter + private val adapter: TrackSearchAdapter, ) : RecyclerView.ViewHolder(binding.root) { fun bind(track: TrackSearch, position: Int) { binding.root.isChecked = position == adapter.selectedItemPosition diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSheet.kt index a23dd4bcac..cf7a2a2306 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSheet.kt @@ -31,7 +31,7 @@ class TrackSheet( val controller: MangaController, val manga: Manga, val fragmentManager: FragmentManager, - private val sourceManager: SourceManager = Injekt.get() + private val sourceManager: SourceManager = Injekt.get(), ) : BaseBottomSheetDialog(controller.activity!!), TrackAdapter.OnClickListener, SetTrackStatusDialog.Listener, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/licenses/LicensesItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/licenses/LicensesItem.kt index 2325e5d9d3..fc5a027229 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/licenses/LicensesItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/licenses/LicensesItem.kt @@ -22,7 +22,7 @@ class LicensesItem(val library: Library) : AbstractFlexibleItem( adapter: FlexibleAdapter>, holder: LicensesHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(library) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt index fa750a6801..e99d1d0d8f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/PageIndicatorTextView.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.widget.OutlineSpan */ class PageIndicatorTextView( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : AppCompatTextView(context, attrs) { init { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 7af5436be2..230bb091e8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -431,7 +431,7 @@ class ReaderActivity : BaseRxActivity() { setOnClickListener { popupMenu( items = ReadingModeType.values().map { it.flagValue to it.stringRes }, - selectedItemId = presenter.getMangaReadingMode(resolveDefault = false), + selectedItemId = presenter.getMangaReadingMode(resolveDefault = false) ) { val newReadingMode = ReadingModeType.fromPreference(itemId) @@ -485,7 +485,7 @@ class ReaderActivity : BaseRxActivity() { popupMenu( items = OrientationType.values().map { it.flagValue to it.stringRes }, selectedItemId = presenter.manga?.orientationType - ?: preferences.defaultOrientationType(), + ?: preferences.defaultOrientationType() ) { val newOrientation = OrientationType.fromPreference(itemId) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderColorFilterView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderColorFilterView.kt index 4638c4dd15..6266ab2394 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderColorFilterView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderColorFilterView.kt @@ -10,7 +10,7 @@ import androidx.core.graphics.toXfermode class ReaderColorFilterView( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : View(context, attrs) { private val colorFilterPaint: Paint = Paint() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt index f5a5d87e5f..1c83f7279f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt @@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.widget.sheet.BaseBottomSheetDialog */ class ReaderPageSheet( private val activity: ReaderActivity, - private val page: ReaderPage + private val page: ReaderPage, ) : BaseBottomSheetDialog(activity) { private lateinit var binding: ReaderPageSheetBinding diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index bec55b8acc..2c633406d0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -273,7 +273,7 @@ class ReaderPresenter( */ private fun getLoadObservable( loader: ChapterLoader, - chapter: ReaderChapter + chapter: ReaderChapter, ): Observable { return loader.loadChapter(chapter) .andThen( diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt index 7965ac8ba5..94f857785f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt @@ -9,7 +9,7 @@ import com.google.android.material.slider.Slider */ class ReaderSlider @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : Slider(context, attrs) { init { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt index 2b60c3b924..d214f889ad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt @@ -21,7 +21,7 @@ class ChapterLoader( private val context: Context, private val downloadManager: DownloadManager, private val manga: Manga, - private val source: Source + private val source: Source, ) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/DownloadPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/DownloadPageLoader.kt index faad167d5d..9d6452eda2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/DownloadPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/DownloadPageLoader.kt @@ -20,7 +20,7 @@ class DownloadPageLoader( private val chapter: ReaderChapter, private val manga: Manga, private val source: Source, - private val downloadManager: DownloadManager + private val downloadManager: DownloadManager, ) : PageLoader() { // Needed to open input streams diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt index 4ac23fbe60..3ef63b5333 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt @@ -26,7 +26,7 @@ import kotlin.math.min class HttpPageLoader( private val chapter: ReaderChapter, private val source: HttpSource, - private val chapterCache: ChapterCache = Injekt.get() + private val chapterCache: ChapterCache = Injekt.get(), ) : PageLoader() { /** @@ -169,7 +169,7 @@ class HttpPageLoader( */ private class PriorityPage( val page: ReaderPage, - val priority: Int + val priority: Int, ) : Comparable { companion object { private val idGenerator = AtomicInteger() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ChapterTransition.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ChapterTransition.kt index 96105e6346..2da46e5b0a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ChapterTransition.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ChapterTransition.kt @@ -7,12 +7,12 @@ sealed class ChapterTransition { class Prev( override val from: ReaderChapter, - override val to: ReaderChapter? + override val to: ReaderChapter?, ) : ChapterTransition() class Next( override val from: ReaderChapter, - override val to: ReaderChapter? + override val to: ReaderChapter?, ) : ChapterTransition() override fun equals(other: Any?): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt index 19431a9b92..6602b96185 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt @@ -7,7 +7,7 @@ open class ReaderPage( index: Int, url: String = "", imageUrl: String? = null, - var stream: (() -> InputStream)? = null + var stream: (() -> InputStream)? = null, ) : Page(index, url, imageUrl, null) { open lateinit var chapter: ReaderChapter diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ViewerChapters.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ViewerChapters.kt index 9d43048409..6fb5905c33 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ViewerChapters.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ViewerChapters.kt @@ -3,7 +3,7 @@ package eu.kanade.tachiyomi.ui.reader.model data class ViewerChapters( val currChapter: ReaderChapter, val prevChapter: ReaderChapter?, - val nextChapter: ReaderChapter? + val nextChapter: ReaderChapter?, ) { fun ref() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt index ccb5877e04..a107052737 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt @@ -64,12 +64,12 @@ class ReaderSettingsSheet( override fun getTabViews() = listOf( readingModeSettings, generalSettings, - colorFilterSettings, + colorFilterSettings ) override fun getTabTitles() = listOf( R.string.pref_category_reading_mode, R.string.pref_category_general, - R.string.custom_filter, + R.string.custom_filter ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/GestureDetectorWithLongTap.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/GestureDetectorWithLongTap.kt index e53ee8b72e..a85f8dc7db 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/GestureDetectorWithLongTap.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/GestureDetectorWithLongTap.kt @@ -14,7 +14,7 @@ import kotlin.math.abs */ open class GestureDetectorWithLongTap( context: Context, - listener: Listener + listener: Listener, ) : GestureDetector(context, listener) { private val handler = Handler(Looper.getMainLooper()) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderButton.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderButton.kt index 5de966670f..270d5549bb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderButton.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderButton.kt @@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewer class ReaderButton @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = R.attr.materialButtonStyle + defStyleAttr: Int = R.attr.materialButtonStyle, ) : MaterialButton(context, attrs, defStyleAttr) { var viewer: PagerViewer? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt index 6a1a2bbe61..7fe01a1051 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt @@ -47,7 +47,7 @@ open class ReaderPageImageView @JvmOverloads constructor( attrs: AttributeSet? = null, @AttrRes defStyleAttrs: Int = 0, @StyleRes defStyleRes: Int = 0, - private val isWebtoon: Boolean = false + private val isWebtoon: Boolean = false, ) : FrameLayout(context, attrs, defStyleAttrs, defStyleRes) { private var pageView: View? = null @@ -254,7 +254,7 @@ open class ReaderPageImageView @JvmOverloads constructor( private fun setNonAnimatedImage( image: Any, - config: Config + config: Config, ) = (pageView as? SubsamplingScaleImageView)?.apply { setDoubleTapZoomDuration(config.zoomDuration.getSystemScaledDuration()) setMinimumScaleType(config.minimumScaleType) @@ -326,7 +326,7 @@ open class ReaderPageImageView @JvmOverloads constructor( private fun setAnimatedImage( image: Any, - config: Config + config: Config, ) = (pageView as? AppCompatImageView)?.apply { if (this is PhotoView) { setZoomTransitionDuration(config.zoomDuration.getSystemScaledDuration()) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderProgressIndicator.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderProgressIndicator.kt index bc9f796dca..9fa6b47268 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderProgressIndicator.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderProgressIndicator.kt @@ -19,7 +19,7 @@ import com.google.android.material.progressindicator.CircularProgressIndicator class ReaderProgressIndicator @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = 0 + defStyleAttr: Int = 0, ) : FrameLayout(context, attrs, defStyleAttr) { private val indicator: CircularProgressIndicator diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt index 10e1d9d7f6..427e7950e5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerConfig.kt @@ -82,7 +82,7 @@ abstract class ViewerConfig(preferences: PreferencesHelper, private val scope: C fun Preference.register( valueAssignment: (T) -> Unit, - onChanged: (T) -> Unit = {} + onChanged: (T) -> Unit = {}, ) { asFlow() .onEach { valueAssignment(it) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt index 6e07758208..605e673ff0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ViewerNavigation.kt @@ -19,7 +19,7 @@ abstract class ViewerNavigation { data class Region( val rectF: RectF, - val type: NavigationRegion + val type: NavigationRegion, ) { fun invert(invertMode: PreferenceValues.TappingInvertMode): Region { if (invertMode == PreferenceValues.TappingInvertMode.NONE) return this diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/EdgeNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/EdgeNavigation.kt index c06c703a34..7208133d2c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/EdgeNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/EdgeNavigation.kt @@ -27,6 +27,6 @@ class EdgeNavigation : ViewerNavigation() { Region( rectF = RectF(0.66f, 0f, 1f, 1f), type = NavigationRegion.NEXT - ), + ) ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/RightAndLeftNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/RightAndLeftNavigation.kt index f0df1afa2d..a159796dad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/RightAndLeftNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/RightAndLeftNavigation.kt @@ -23,6 +23,6 @@ class RightAndLeftNavigation : ViewerNavigation() { Region( rectF = RectF(0.66f, 0f, 1f, 1f), type = NavigationRegion.RIGHT - ), + ) ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/Pager.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/Pager.kt index 5d6f959cc2..87c1e1678d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/Pager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/Pager.kt @@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.ui.reader.viewer.GestureDetectorWithLongTap */ open class Pager( context: Context, - isHorizontal: Boolean = true + isHorizontal: Boolean = true, ) : DirectionalViewPager(context, isHorizontal) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt index 2fbd8ddfb9..ad79adf310 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt @@ -21,7 +21,7 @@ import uy.kohesive.injekt.api.get class PagerConfig( private val viewer: PagerViewer, scope: CoroutineScope, - preferences: PreferencesHelper = Injekt.get() + preferences: PreferencesHelper = Injekt.get(), ) : ViewerConfig(preferences, scope) { var theme = preferences.readerTheme().get() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt index 2f261a0d42..c621701288 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit class PagerPageHolder( readerThemedContext: Context, val viewer: PagerViewer, - val page: ReaderPage + val page: ReaderPage, ) : ReaderPageImageView(readerThemedContext), ViewPagerAdapter.PositionableView { /** @@ -227,7 +227,7 @@ class PagerPageHolder( minimumScaleType = viewer.config.imageScaleType, cropBorders = viewer.config.imageCropBorders, zoomStartPosition = viewer.config.imageZoomType, - landscapeZoom = viewer.config.landscapeZoom, + landscapeZoom = viewer.config.landscapeZoom ) ) if (!isAnimated) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt index 3f97a212d6..9f712c2da1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt @@ -27,7 +27,7 @@ import rx.android.schedulers.AndroidSchedulers class PagerTransitionHolder( readerThemedContext: Context, val viewer: PagerViewer, - val transition: ChapterTransition + val transition: ChapterTransition, ) : LinearLayout(readerThemedContext), ViewPagerAdapter.PositionableView { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt index f53b8fe50c..c040001d78 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt @@ -171,7 +171,7 @@ class PagerViewerAdapter(private val viewer: PagerViewer) : ViewPagerAdapter() { val placeAtIndex = when (viewer) { is L2RPagerViewer, - is VerticalPagerViewer -> currentIndex + 1 + is VerticalPagerViewer, -> currentIndex + 1 else -> currentIndex } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt index 4a484035f8..6877cf602e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt @@ -149,7 +149,7 @@ class WebtoonAdapter(val viewer: WebtoonViewer) : RecyclerView.Adapter, - private val newItems: List + private val newItems: List, ) : DiffUtil.Callback() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt index eff894517c..394f44d484 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt @@ -8,7 +8,7 @@ import rx.Subscription abstract class WebtoonBaseHolder( view: View, - protected val viewer: WebtoonViewer + protected val viewer: WebtoonViewer, ) : RecyclerView.ViewHolder(view) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt index cc116d6558..f14a02e5d7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt @@ -20,7 +20,7 @@ import uy.kohesive.injekt.api.get */ class WebtoonConfig( scope: CoroutineScope, - preferences: PreferencesHelper = Injekt.get() + preferences: PreferencesHelper = Injekt.get(), ) : ViewerConfig(preferences, scope) { var themeChangedListener: (() -> Unit)? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt index 3f919569ca..db711efbbe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonFrame.kt @@ -71,7 +71,7 @@ class WebtoonFrame(context: Context) : FrameLayout(context) { e1: MotionEvent?, e2: MotionEvent?, velocityX: Float, - velocityY: Float + velocityY: Float, ): Boolean { return recycler?.zoomFling(velocityX.toInt(), velocityY.toInt()) ?: false } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt index fecdfc9566..d6891f704e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt @@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit */ class WebtoonPageHolder( private val frame: ReaderPageImageView, - viewer: WebtoonViewer + viewer: WebtoonViewer, ) : WebtoonBaseHolder(frame, viewer) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt index 49a4be4ad2..1063eb226a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonRecyclerView.kt @@ -20,7 +20,7 @@ import kotlin.math.abs open class WebtoonRecyclerView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyle: Int = 0 + defStyle: Int = 0, ) : RecyclerView(context, attrs, defStyle) { private var isZooming = false @@ -94,7 +94,7 @@ open class WebtoonRecyclerView @JvmOverloads constructor( fromX: Float, toX: Float, fromY: Float, - toY: Float + toY: Float, ) { isZooming = true val animatorSet = AnimatorSet() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonSubsamplingImageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonSubsamplingImageView.kt index 88f916161d..328d6725a5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonSubsamplingImageView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonSubsamplingImageView.kt @@ -11,7 +11,7 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView */ class WebtoonSubsamplingImageView @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : SubsamplingScaleImageView(context, attrs) { override fun onTouchEvent(event: MotionEvent): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt index d14f5bc0a8..cad1cd218a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt @@ -22,7 +22,7 @@ import rx.android.schedulers.AndroidSchedulers */ class WebtoonTransitionHolder( val layout: LinearLayout, - viewer: WebtoonViewer + viewer: WebtoonViewer, ) : WebtoonBaseHolder(layout, viewer) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt index fd361bf8dc..beb39c5b88 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt @@ -320,11 +320,13 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_UP, - KeyEvent.KEYCODE_PAGE_UP -> if (isUp) scrollUp() + KeyEvent.KEYCODE_PAGE_UP, + -> if (isUp) scrollUp() KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.KEYCODE_DPAD_DOWN, - KeyEvent.KEYCODE_PAGE_DOWN -> if (isUp) scrollDown() + KeyEvent.KEYCODE_PAGE_DOWN, + -> if (isUp) scrollDown() else -> return false } return true diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt index 6ef3a38cd0..8875f96eed 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryHolder.kt @@ -21,7 +21,7 @@ import java.util.Date */ class HistoryHolder( view: View, - val adapter: HistoryAdapter + val adapter: HistoryAdapter, ) : FlexibleViewHolder(view, adapter) { private val binding = HistoryItemBinding.bind(view) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryItem.kt index 9a10529b2a..58f9e0cc21 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryItem.kt @@ -24,7 +24,7 @@ class HistoryItem(val mch: MangaChapterHistory, header: DateSectionItem) : adapter: FlexibleAdapter>, holder: HistoryHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(mch) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesAdapter.kt index 70b1312253..c0b9f7eb26 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesAdapter.kt @@ -9,7 +9,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor class UpdatesAdapter( val controller: UpdatesController, context: Context, - val items: List>? + val items: List>?, ) : BaseChaptersAdapter>(controller, items) { var readColor = context.getResourceColor(R.attr.colorOnSurface, 0.38f) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesItem.kt index 1f25244b5f..d5d9006166 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesItem.kt @@ -25,7 +25,7 @@ class UpdatesItem(chapter: Chapter, val manga: Manga, header: DateSectionItem) : adapter: FlexibleAdapter>, holder: UpdatesHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt index 40247b871c..1f91d30a20 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/security/UnlockActivity.kt @@ -26,7 +26,7 @@ class UnlockActivity : BaseActivity() { override fun onAuthenticationError( activity: FragmentActivity?, errorCode: Int, - errString: CharSequence + errString: CharSequence, ) { super.onAuthenticationError(activity, errorCode, errString) logcat(LogPriority.ERROR) { errString.toString() } @@ -35,7 +35,7 @@ class UnlockActivity : BaseActivity() { override fun onAuthenticationSucceeded( activity: FragmentActivity?, - result: BiometricPrompt.AuthenticationResult + result: BiometricPrompt.AuthenticationResult, ) { super.onAuthenticationSucceeded(activity, result) SecureActivityDelegate.locked = false diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index dd873bcfa1..822a3d762c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -169,14 +169,14 @@ class SettingsAdvancedController : SettingsController() { "Cloudflare", "Google", "AdGuard", - "Quad9", + "Quad9" ) entryValues = arrayOf( "-1", PREF_DOH_CLOUDFLARE.toString(), PREF_DOH_GOOGLE.toString(), PREF_DOH_ADGUARD.toString(), - PREF_DOH_QUAD9.toString(), + PREF_DOH_QUAD9.toString() ) defaultValue = "-1" summary = "%s" diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt index 0fb1990ee3..22d508b407 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt @@ -103,7 +103,7 @@ class SettingsAppearanceController : SettingsController() { entriesRes = arrayOf( R.string.alignment_top, R.string.alignment_center, - R.string.alignment_bottom, + R.string.alignment_bottom ) entryValues = arrayOf("0", "1", "2") summary = "%s" diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBrowseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBrowseController.kt index b66a02a0bb..796260e4cf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBrowseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBrowseController.kt @@ -58,7 +58,7 @@ class SettingsBrowseController : SettingsController() { requireAuthentication( activity as? FragmentActivity, context.getString(R.string.pref_category_nsfw_content), - context.getString(R.string.confirm_lock_change), + context.getString(R.string.confirm_lock_change) ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt index 956ec8853e..188c2bac3b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt @@ -342,9 +342,11 @@ class SettingsLibraryController : SettingsController() { .map { when (it.id.toString()) { in preferences.libraryUpdateCategories() - .get() -> QuadStateTextView.State.CHECKED.ordinal + .get(), + -> QuadStateTextView.State.CHECKED.ordinal in preferences.libraryUpdateCategoriesExclude() - .get() -> QuadStateTextView.State.INVERSED.ordinal + .get(), + -> QuadStateTextView.State.INVERSED.ordinal else -> QuadStateTextView.State.UNCHECKED.ordinal } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index 5a8f75446a..845b787726 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -81,7 +81,7 @@ class SettingsReaderController : SettingsController() { R.string.rotation_reverse_portrait, R.string.rotation_landscape, R.string.rotation_force_portrait, - R.string.rotation_force_landscape, + R.string.rotation_force_landscape ) entryValues = OrientationType.values().drop(1) .map { value -> "${value.flagValue}" }.toTypedArray() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSecurityController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSecurityController.kt index 16ffb63374..fc06138b67 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSecurityController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsSecurityController.kt @@ -34,7 +34,7 @@ class SettingsSecurityController : SettingsController() { requireAuthentication( activity as? FragmentActivity, context.getString(R.string.lock_with_biometrics), - context.getString(R.string.confirm_lock_change), + context.getString(R.string.confirm_lock_change) ) } @@ -60,7 +60,7 @@ class SettingsSecurityController : SettingsController() { callback = object : AuthenticatorUtil.AuthenticationCallback() { override fun onAuthenticationSucceeded( activity: FragmentActivity?, - result: BiometricPrompt.AuthenticationResult + result: BiometricPrompt.AuthenticationResult, ) { super.onAuthenticationSucceeded(activity, result) value = newValue as String @@ -69,7 +69,7 @@ class SettingsSecurityController : SettingsController() { override fun onAuthenticationError( activity: FragmentActivity?, errorCode: Int, - errString: CharSequence + errString: CharSequence, ) { super.onAuthenticationError(activity, errorCode, errString) activity?.toast(errString.toString()) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt index 4966b0582d..dd661836f4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt @@ -95,7 +95,7 @@ class SettingsTrackingController : private inline fun PreferenceGroup.trackPreference( service: TrackService, - crossinline login: () -> Unit + crossinline login: () -> Unit, ): TrackerPreference { return add( TrackerPreference(context).apply { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchAdapter.kt index 4c80c9159a..2d749363c9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchAdapter.kt @@ -25,7 +25,7 @@ class SettingsSearchAdapter(val controller: SettingsSearchController) : override fun onBindViewHolder( holder: RecyclerView.ViewHolder, position: Int, - payloads: List + payloads: List, ) { super.onBindViewHolder(holder, position, payloads) restoreHolderState(holder) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchHelper.kt index 2beeb1dd0f..8ed8237f57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchHelper.kt @@ -81,7 +81,7 @@ object SettingsSearchHelper { private fun getSettingSearchResult( ctrl: SettingsController, pref: Preference, - breadcrumbs: String = "" + breadcrumbs: String = "", ) { when { pref is PreferenceGroup -> { @@ -135,6 +135,6 @@ object SettingsSearchHelper { val title: String, val summary: String, val breadcrumb: String, - val searchController: SettingsController + val searchController: SettingsController, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchItem.kt index 137e6b834f..092e0178d5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchItem.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.R */ class SettingsSearchItem( val settingsSearchResult: SettingsSearchHelper.SettingsSearchResult, - val results: List? + val results: List?, ) : AbstractFlexibleItem() { @@ -30,7 +30,7 @@ class SettingsSearchItem( */ override fun createViewHolder( view: View, - adapter: FlexibleAdapter> + adapter: FlexibleAdapter>, ): SettingsSearchHolder { return SettingsSearchHolder(view, adapter as SettingsSearchAdapter) } @@ -39,7 +39,7 @@ class SettingsSearchItem( adapter: FlexibleAdapter>, holder: SettingsSearchHolder, position: Int, - payloads: List? + payloads: List?, ) { holder.bind(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/TrackLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/TrackLoginDialog.kt index 62e287f947..9ebe27fa6f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/TrackLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/TrackLoginDialog.kt @@ -16,7 +16,7 @@ import uy.kohesive.injekt.api.get class TrackLoginDialog( @StringRes usernameLabelRes: Int? = null, - bundle: Bundle? = null + bundle: Bundle? = null, ) : LoginDialogPreference(usernameLabelRes, bundle) { private val service = Injekt.get().getService(args.getInt("serviceId"))!! 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 162b919e44..4aee9e2467 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/util/lang/DateExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt index 33368e44a9..1704915955 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt @@ -102,7 +102,7 @@ private const val MILLISECONDS_IN_DAY = 86_400_000L fun Date.toRelativeString( context: Context, range: Int = 7, - dateFormat: DateFormat = DateFormat.getDateInstance(DateFormat.SHORT) + dateFormat: DateFormat = DateFormat.getDateInstance(DateFormat.SHORT), ): String { if (range == 0) { return dateFormat.format(this) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/lang/RetryWithDelay.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/RetryWithDelay.kt index bc1d9a801a..8d368cbc6b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/lang/RetryWithDelay.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/lang/RetryWithDelay.kt @@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit.MILLISECONDS class RetryWithDelay( private val maxRetries: Int = 1, private val retryStrategy: (Int) -> Int = { 1000 }, - private val scheduler: Scheduler = Schedulers.computation() + private val scheduler: Scheduler = Schedulers.computation(), ) : Func1, Observable<*>> { private var retryCount = 0 diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt index 50f6d02ff5..c44f740b0e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/lang/RxCoroutineBridge.kt @@ -41,11 +41,11 @@ private suspend fun Observable.awaitOne(): T = suspendCancellableCoroutin } override fun onError(e: Throwable) { -/* - * Rx1 observable throws NoSuchElementException if cancellation happened before - * element emission. To mitigate this we try to atomically resume continuation with exception: - * if resume failed, then we know that continuation successfully cancelled itself - */ + /* + * Rx1 observable throws NoSuchElementException if cancellation happened before + * element emission. To mitigate this we try to atomically resume continuation with exception: + * if resume failed, then we know that continuation successfully cancelled itself + */ val token = cont.tryResumeWithException(e) if (token != null) { cont.completeResume(token) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt index 0b648a137b..1cda712671 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt @@ -142,7 +142,7 @@ inline fun SwitchPreferenceCompat.requireAuthentication(activity: FragmentActivi callback = object : AuthenticatorUtil.AuthenticationCallback() { override fun onAuthenticationSucceeded( activity: FragmentActivity?, - result: BiometricPrompt.AuthenticationResult + result: BiometricPrompt.AuthenticationResult, ) { super.onAuthenticationSucceeded(activity, result) isChecked = newValue as Boolean @@ -151,7 +151,7 @@ inline fun SwitchPreferenceCompat.requireAuthentication(activity: FragmentActivi override fun onAuthenticationError( activity: FragmentActivity?, errorCode: Int, - errString: CharSequence + errString: CharSequence, ) { super.onAuthenticationError(activity, errorCode, errString) activity?.toast(errString.toString()) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/AuthenticatorUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/AuthenticatorUtil.kt index c0e8a971da..1fd0a2ec75 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/AuthenticatorUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/AuthenticatorUtil.kt @@ -31,7 +31,7 @@ object AuthenticatorUtil { title: String, subtitle: String? = null, confirmationRequired: Boolean = true, - callback: AuthenticationCallback + callback: AuthenticationCallback, ) { isAuthenticating = true startClass2BiometricOrCredentialAuthentication( @@ -72,7 +72,7 @@ object AuthenticatorUtil { override fun onAuthenticationError( activity: FragmentActivity?, @AuthenticationError errorCode: Int, - errString: CharSequence + errString: CharSequence, ) { isAuthenticating = false } @@ -90,7 +90,7 @@ object AuthenticatorUtil { @CallSuper override fun onAuthenticationSucceeded( activity: FragmentActivity?, - result: BiometricPrompt.AuthenticationResult + result: BiometricPrompt.AuthenticationResult, ) { isAuthenticating = false } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt index e541f52b17..5e2e9c5259 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/LogcatExtensions.kt @@ -7,7 +7,7 @@ import logcat.logcat inline fun Any.logcat( priority: LogPriority = LogPriority.DEBUG, throwable: Throwable? = null, - message: () -> String = { "" } + message: () -> String = { "" }, ) = logcat(priority = priority) { var msg = message() if (throwable != null) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/NotificationExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/NotificationExtensions.kt index 9b44dbcdb2..70e44d645d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/NotificationExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/NotificationExtensions.kt @@ -12,7 +12,7 @@ import androidx.core.app.NotificationChannelGroupCompat */ fun buildNotificationChannelGroup( channelId: String, - block: (NotificationChannelGroupCompat.Builder.() -> Unit) + block: (NotificationChannelGroupCompat.Builder.() -> Unit), ): NotificationChannelGroupCompat { val builder = NotificationChannelGroupCompat.Builder(channelId) builder.block() @@ -30,7 +30,7 @@ fun buildNotificationChannelGroup( fun buildNotificationChannel( channelId: String, channelImportance: Int, - block: (NotificationChannelCompat.Builder.() -> Unit) + block: (NotificationChannelCompat.Builder.() -> Unit), ): NotificationChannelCompat { val builder = NotificationChannelCompat.Builder(channelId, channelImportance) builder.block() diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/WebViewClientCompat.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/WebViewClientCompat.kt index 5ccbb4f7e5..df3aa3dceb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/WebViewClientCompat.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/WebViewClientCompat.kt @@ -24,14 +24,14 @@ abstract class WebViewClientCompat : WebViewClient() { errorCode: Int, description: String?, failingUrl: String, - isMainFrame: Boolean + isMainFrame: Boolean, ) { } @TargetApi(Build.VERSION_CODES.N) final override fun shouldOverrideUrlLoading( view: WebView, - request: WebResourceRequest + request: WebResourceRequest, ): Boolean { return shouldOverrideUrlCompat(view, request.url.toString()) } @@ -42,14 +42,14 @@ abstract class WebViewClientCompat : WebViewClient() { final override fun shouldInterceptRequest( view: WebView, - request: WebResourceRequest + request: WebResourceRequest, ): WebResourceResponse? { return shouldInterceptRequestCompat(view, request.url.toString()) } final override fun shouldInterceptRequest( view: WebView, - url: String + url: String, ): WebResourceResponse? { return shouldInterceptRequestCompat(view, url) } @@ -57,7 +57,7 @@ abstract class WebViewClientCompat : WebViewClient() { final override fun onReceivedError( view: WebView, request: WebResourceRequest, - error: WebResourceError + error: WebResourceError, ) { onReceivedErrorCompat( view, @@ -72,7 +72,7 @@ abstract class WebViewClientCompat : WebViewClient() { view: WebView, errorCode: Int, description: String?, - failingUrl: String + failingUrl: String, ) { onReceivedErrorCompat(view, errorCode, description, failingUrl, failingUrl == view.url) } @@ -80,7 +80,7 @@ abstract class WebViewClientCompat : WebViewClient() { final override fun onReceivedHttpError( view: WebView, request: WebResourceRequest, - error: WebResourceResponse + error: WebResourceResponse, ) { onReceivedErrorCompat( view, diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ImageViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ImageViewExtensions.kt index 5df8fcb334..e70e9281dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ImageViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ImageViewExtensions.kt @@ -38,7 +38,7 @@ fun ImageView.setVectorCompat(@DrawableRes drawable: Int, @AttrRes tint: Int? = fun ImageView.loadAutoPause( data: Any?, loader: ImageLoader = context.imageLoader, - builder: ImageRequest.Builder.() -> Unit = {} + builder: ImageRequest.Builder.() -> Unit = {}, ) { load(data, loader) { placeholder(ColorDrawable(context.getColor(R.color.cover_placeholder))) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt index 338ac8a793..28b197af5f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt @@ -52,7 +52,7 @@ fun View.getCoordinates() = Point((left + right) / 2, (top + bottom) / 2) inline fun View.snack( message: String, length: Int = 10_000, - f: Snackbar.() -> Unit = {} + f: Snackbar.() -> Unit = {}, ): Snackbar { val snack = Snackbar.make(this, message, length) snack.f() @@ -88,7 +88,7 @@ inline fun View.setTooltip(text: String) { inline fun View.popupMenu( @MenuRes menuRes: Int, noinline initMenu: (Menu.() -> Unit)? = null, - noinline onMenuItemClick: MenuItem.() -> Unit + noinline onMenuItemClick: MenuItem.() -> Unit, ): PopupMenu { val popup = PopupMenu(context, this, Gravity.NO_GRAVITY, R.attr.actionOverflowMenuStyle, 0) popup.menuInflater.inflate(menuRes, popup.menu) @@ -116,7 +116,7 @@ inline fun View.popupMenu( inline fun View.popupMenu( items: List>, selectedItemId: Int? = null, - noinline onMenuItemClick: MenuItem.() -> Unit + noinline onMenuItemClick: MenuItem.() -> Unit, ): PopupMenu { val popup = PopupMenu(context, this, Gravity.NO_GRAVITY, R.attr.actionOverflowMenuStyle, 0) items.forEach { (id, stringRes) -> @@ -174,7 +174,7 @@ inline fun ExtendedFloatingActionButton.shrinkOnScroll(recycler: RecyclerView): inline fun ChipGroup.setChips( items: List?, noinline onClick: ((item: String) -> Unit)? = null, - noinline onLongClick: ((item: String) -> Unit)? = null + noinline onLongClick: ((item: String) -> Unit)? = null, ) { removeAllViews() diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt index 9086752a45..21dd1f2948 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt @@ -89,6 +89,6 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? data class Action( @StringRes val stringResId: Int, @DrawableRes val iconResId: Int, - val listener: OnClickListener + val listener: OnClickListener, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ExtendedNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ExtendedNavigationView.kt index a3f2fdfbb0..f1dfe7f127 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ExtendedNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ExtendedNavigationView.kt @@ -20,7 +20,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor open class ExtendedNavigationView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = 0 + defStyleAttr: Int = 0, ) : SimpleNavigationView(context, attrs, defStyleAttr) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt index a4b7a43dd6..fa71554a10 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt @@ -20,7 +20,7 @@ import kotlin.math.roundToLong */ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( context: Context? = null, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : CoordinatorLayout.Behavior(context, attrs) { @ViewCompat.NestedScrollType @@ -37,7 +37,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( override fun onDependentViewChanged( parent: CoordinatorLayout, child: BottomNavigationView, - dependency: View + dependency: View, ): Boolean { val toolbarSize = (dependency as ViewGroup).findChild()?.height ?: 0 dyRatio = if (toolbarSize > 0) { @@ -54,7 +54,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( directTargetChild: View, target: View, axes: Int, - type: Int + type: Int, ): Boolean { if (axes != ViewCompat.SCROLL_AXIS_VERTICAL) { return false @@ -71,7 +71,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( dx: Int, dy: Int, consumed: IntArray, - type: Int + type: Int, ) { super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type) child.translationY = (child.translationY + (dy * dyRatio)).coerceIn(0F, child.height.toFloat()) @@ -81,7 +81,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( coordinatorLayout: CoordinatorLayout, child: BottomNavigationView, target: View, - type: Int + type: Int, ) { if (lastStartedType == ViewCompat.TYPE_TOUCH || type == ViewCompat.TYPE_NON_TOUCH) { animateBottomNavigationVisibility(child, child.translationY < child.height / 2) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt index ed6c622757..3b4618ad9e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt @@ -27,7 +27,7 @@ class MangaSummaryView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0, - @StyleRes defStyleRes: Int = 0 + @StyleRes defStyleRes: Int = 0, ) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) { private val binding = MangaSummaryBinding.inflate(LayoutInflater.from(context), this, true) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialFastScroll.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialFastScroll.kt index d2c21c8d66..0b9ca04d9d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialFastScroll.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MaterialFastScroll.kt @@ -18,7 +18,7 @@ class MaterialFastScroll @JvmOverloads constructor(context: Context, attrs: Attr setViewsToUse( R.layout.material_fastscroll, R.id.fast_scroller_bubble, - R.id.fast_scroller_handle, + R.id.fast_scroller_handle ) autoHideEnabled = true ignoreTouchesOutsideHandle = true diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt index b7ab3a82fb..e5125a28c1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/OutlineSpan.kt @@ -13,7 +13,7 @@ import androidx.annotation.Dimension */ class OutlineSpan( @ColorInt private val strokeColor: Int, - @Dimension private val strokeWidth: Float + @Dimension private val strokeWidth: Float, ) : ReplacementSpan() { override fun getSize( @@ -21,7 +21,7 @@ class OutlineSpan( text: CharSequence, start: Int, end: Int, - fm: Paint.FontMetricsInt? + fm: Paint.FontMetricsInt?, ): Int { return paint.measureText(text.toString().substring(start until end)).toInt() } @@ -35,7 +35,7 @@ class OutlineSpan( top: Int, y: Int, bottom: Int, - paint: Paint + paint: Paint, ) { val originTextColor = paint.color diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt index c8ed0a1046..45453a93ce 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt @@ -25,7 +25,7 @@ import eu.kanade.tachiyomi.R as TR open class SimpleNavigationView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = 0 + defStyleAttr: Int = 0, ) : FrameLayout(context, attrs, defStyleAttr) { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiAppBarLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiAppBarLayout.kt index e54379e010..eb3ced1f83 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiAppBarLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiAppBarLayout.kt @@ -30,7 +30,7 @@ import reactivecircus.flowbinding.android.view.hierarchyChangeEvents */ class TachiyomiAppBarLayout @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : AppBarLayout(context, attrs) { private var lifted = true 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 836715b709..da42cdbee9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt @@ -29,7 +29,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.bottomNavigationStyle, - defStyleRes: Int = R.style.Widget_Design_BottomNavigationView + defStyleRes: Int = R.style.Widget_Design_BottomNavigationView, ) : BottomNavigationView(context, attrs, defStyleAttr, defStyleRes) { private var currentAnimator: ViewPropertyAnimator? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiChangeHandlerFrameLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiChangeHandlerFrameLayout.kt index 91aade2eec..2667b56590 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiChangeHandlerFrameLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiChangeHandlerFrameLayout.kt @@ -11,7 +11,7 @@ import com.bluelinelabs.conductor.ChangeHandlerFrameLayout */ class TachiyomiChangeHandlerFrameLayout( context: Context, - attrs: AttributeSet + attrs: AttributeSet, ) : ChangeHandlerFrameLayout(context, attrs), CoordinatorLayout.AttachedBehavior { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiCoordinatorLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiCoordinatorLayout.kt index 90516828ee..e7d7db22ca 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiCoordinatorLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiCoordinatorLayout.kt @@ -29,7 +29,7 @@ import eu.kanade.tachiyomi.util.view.findChild class TachiyomiCoordinatorLayout @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = R.attr.coordinatorLayoutStyle + defStyleAttr: Int = R.attr.coordinatorLayoutStyle, ) : CoordinatorLayout(context, attrs, defStyleAttr) { /** @@ -58,7 +58,7 @@ class TachiyomiCoordinatorLayout @JvmOverloads constructor( dxUnconsumed: Int, dyUnconsumed: Int, type: Int, - consumed: IntArray + consumed: IntArray, ) { super.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type, consumed) // Disable elevation overlay when tabs are visible diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiSearchView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiSearchView.kt index b4f01a19e1..cc913f618a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiSearchView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiSearchView.kt @@ -23,7 +23,7 @@ import uy.kohesive.injekt.api.get class TachiyomiSearchView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = R.attr.searchViewStyle + defStyleAttr: Int = R.attr.searchViewStyle, ) : SearchView(context, attrs, defStyleAttr) { private var scope: CoroutineScope? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiTextInputEditText.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiTextInputEditText.kt index 275f112bca..0bbd328a66 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiTextInputEditText.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiTextInputEditText.kt @@ -26,7 +26,7 @@ import uy.kohesive.injekt.api.get class TachiyomiTextInputEditText @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, - defStyleAttr: Int = R.attr.editTextStyle + defStyleAttr: Int = R.attr.editTextStyle, ) : TextInputEditText(context, attrs, defStyleAttr) { private var scope: CoroutineScope? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt index e0bde85120..51bf2ec4f5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ThemedSwipeRefreshLayout.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.util.system.getThemeColor class ThemedSwipeRefreshLayout @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : SwipeRefreshLayout(context, attrs) { init { // Background diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/MaterialAlertDialogBuilderExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/MaterialAlertDialogBuilderExtensions.kt index da8b93d91c..c9135bd25f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/MaterialAlertDialogBuilderExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/MaterialAlertDialogBuilderExtensions.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.databinding.DialogStubTextinputBinding fun MaterialAlertDialogBuilder.setTextInput( hint: String? = null, prefill: String? = null, - onTextChanged: (String) -> Unit + onTextChanged: (String) -> Unit, ): MaterialAlertDialogBuilder { val binding = DialogStubTextinputBinding.inflate(LayoutInflater.from(context)) binding.textField.hint = hint @@ -43,7 +43,7 @@ fun MaterialAlertDialogBuilder.setQuadStateMultiChoiceItems( items: List, initialSelected: IntArray, disabledIndices: IntArray? = null, - selection: QuadStateMultiChoiceListener + selection: QuadStateMultiChoiceListener, ): MaterialAlertDialogBuilder { val binding = DialogStubQuadstatemultichoiceBinding.inflate(LayoutInflater.from(context)) binding.list.layoutManager = LinearLayoutManager(context) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceDialogAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceDialogAdapter.kt index fb4bff7ddc..c6ee7f9146 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceDialogAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceDialogAdapter.kt @@ -19,7 +19,7 @@ internal class QuadStateMultiChoiceDialogAdapter( disabledItems: IntArray?, private var initialSelected: IntArray, internal var listener: QuadStateMultiChoiceListener, - val isActionList: Boolean = true + val isActionList: Boolean = true, ) : RecyclerView.Adapter() { private val states = QuadStateTextView.State.values() @@ -80,7 +80,7 @@ internal class QuadStateMultiChoiceDialogAdapter( override fun onCreateViewHolder( parent: ViewGroup, - viewType: Int + viewType: Int, ): QuadStateMultiChoiceViewHolder { return QuadStateMultiChoiceViewHolder( itemBinding = DialogQuadstatemultichoiceItemBinding @@ -93,7 +93,7 @@ internal class QuadStateMultiChoiceDialogAdapter( override fun onBindViewHolder( holder: QuadStateMultiChoiceViewHolder, - position: Int + position: Int, ) { holder.isEnabled = !disabledIndices.contains(position) holder.controlView.state = states[currentSelection[position]] @@ -103,7 +103,7 @@ internal class QuadStateMultiChoiceDialogAdapter( override fun onBindViewHolder( holder: QuadStateMultiChoiceViewHolder, position: Int, - payloads: MutableList + payloads: MutableList, ) { when (payloads.firstOrNull()) { CheckPayload -> { diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceViewHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceViewHolder.kt index fc427b1856..c75c216045 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceViewHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/materialdialogs/QuadStateMultiChoiceViewHolder.kt @@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.databinding.DialogQuadstatemultichoiceItemBinding internal class QuadStateMultiChoiceViewHolder( itemBinding: DialogQuadstatemultichoiceItemBinding, - private val adapter: QuadStateMultiChoiceDialogAdapter + private val adapter: QuadStateMultiChoiceDialogAdapter, ) : RecyclerView.ViewHolder(itemBinding.root), View.OnClickListener { init { itemView.setOnClickListener(this) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt index f14ec107f4..6d46885cdc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginDialogPreference.kt @@ -17,7 +17,7 @@ import uy.kohesive.injekt.injectLazy abstract class LoginDialogPreference( @StringRes private val usernameLabelRes: Int? = null, - bundle: Bundle? = null + bundle: Bundle? = null, ) : DialogController(bundle) { var binding: PrefAccountLoginBinding? = null diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt index 15d64392a6..ab97896e39 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SwitchPreferenceCategory.kt @@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor class SwitchPreferenceCategory @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : PreferenceCategory( context, 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 38e71410f7..4c5bd324d7 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/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt index af8be9aaf7..8b05e70269 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt @@ -10,7 +10,7 @@ import java.lang.reflect.Field */ class BottomSheetViewPager @JvmOverloads constructor( context: Context, - attrs: AttributeSet? = null + attrs: AttributeSet? = null, ) : ViewPager(context, attrs) { private val positionField: Field = LayoutParams::class.java.getDeclaredField("position").also { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5a2116d035..a86d9bf8c1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -107,5 +107,5 @@ shizuku = ["shizuku-api","shizuku-provider"] robolectric = ["robolectric-core","robolectric-playservices"] [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 diff --git a/ktlintCodeStyle.xml b/ktlintCodeStyle.xml deleted file mode 100644 index e1422c7c8f..0000000000 --- a/ktlintCodeStyle.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - -
- - - - xmlns:android - - ^$ - - - -
-
- - - - xmlns:.* - - ^$ - - - BY_NAME - -
-
- - - - .*:id - - http://schemas.android.com/apk/res/android - - - -
-
- - - - .*:name - - http://schemas.android.com/apk/res/android - - - -
-
- - - - name - - ^$ - - - -
-
- - - - style - - ^$ - - - -
-
- - - - .* - - ^$ - - - BY_NAME - -
-
- - - - .* - - http://schemas.android.com/apk/res/android - - - ANDROID_ATTRIBUTE_ORDER - -
-
- - - - .* - - .* - - - BY_NAME - -
-
-
-
- - -
\ No newline at end of file