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 000000000..b0aa6f2c2 --- /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 10fa5bd31..a648df8cb 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 f0c9873a3..41e5f77a2 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 be5d73e52..573d5f0bd 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 ad0fb5b74..bc1d333d1 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 98b415e60..790e433c9 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 e513b0aa2..242a59cd7 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 a8c12f584..ecda179c4 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 32ab16e87..8cedb9aff 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 2766eeecc..ba965cfa3 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 59de4bdf5..0de0f6ab9 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 5d5f65c36..5eb703038 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 c3b2cff48..5a9a8f239 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 f340f63a2..2f01b89c6 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 dc2339580..cb025e7dc 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 9625d6b95..57c78e5f1 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 90d8c802c..11e1f7898 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 22b13d676..0f4624d3a 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 33b7d8e60..32796dd7d 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 af4982bb9..4b7b623c2 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 a426680fa..6ed5ffb86 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 9ffcfdafe..9d01905f3 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 e7cae48b8..ddd8da2ce 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 be6af8cca..4b55ccb1f 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 f05a0dc06..b8af832c2 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 93f09fc04..41cd2fe8a 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 d6de7e1a9..49067070f 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 d0c2ffa45..1cea3438d 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 297a01216..301167366 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 774438a5e..25776d341 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 a75f46389..f69bac3f5 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 95c1f6dd2..514be8fb0 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 e0c968f08..86cfc89b1 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 29e148461..48c9f33f5 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 5cd28c496..33dade31c 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 85b1e89b8..a5732ba07 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 590e6f225..17cd1c3ef 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 998789197..16b01db2f 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 d0d2a03cb..786a38fd3 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 068fac3f6..2d3b2e632 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 ccd92d52e..ec7633104 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 87d1de650..06af026c1 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 44b1884ce..c8e051a93 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 f470caa54..2b8301fe9 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 9a6d5cd2a..6028bae53 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 3d3b88b54..8931b90b9 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 0a8464143..b697a9f16 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 e2a8a9232..27b2fe73b 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 05a638375..8bf5d7632 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 7f0ddc907..1318c75f5 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 a0251c25e..cc8482322 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 cd0059f5c..5e895f6b5 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 f9cef4208..729edc4ee 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 3e3147c66..1ac5af766 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 7e2c73c7b..40d615133 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 3af0924cd..6ad16471b 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 a2cc2800e..8e10fd7e6 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 fef73116b..ec2e998f0 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 84bc76cf4..73b42a3f5 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 2b699b551..dba7e0209 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 744046a01..5b65ae1d6 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 e617a7fdb..b6e187889 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 08dd11846..90fd1ebb5 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 b94e4b5dd..a9d02b014 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 5360f582a..bb0f45fab 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 f08f0134d..40858b052 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 87cacb73d..483999725 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 f7436d0e6..b285f9f1a 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 ba2a57aaf..02a010988 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 3102d7d1e..aae8ccbfe 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 a5cb700bc..72eb7f0e2 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 9c3637a6d..0a03eaf34 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 3a3daef78..054540267 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 fbfb28bc2..b2df301c4 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 ab80828d3..b22330e53 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 cdcde2a8b..27578c201 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 1c6aab6b6..2b5d2002f 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 51db5949a..5df04fddb 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 b69cc07bd..b4103a7e5 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 3393d7c12..783ec061f 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 6c7802dc9..cd03f3128 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 45a6dfbda..0139e8f61 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 6a18ef897..c472a7625 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 3f6334017..2c3c7fcfe 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 4e753d527..ea699ec7b 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 095c47eb6..2dc5aed8c 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 d6e054d23..3d36b56cf 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 e2e0e50a5..c14b1ee7e 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 a1dd481b4..61f9941ac 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 f4068a601..3b268ff64 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 bf7afb633..ba8925a54 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 b11b2e1bc..0f2ad1d9b 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 d4d37da6f..45d32ebda 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 0516370f6..5fd1b6fef 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 9275a11ac..4a4c74672 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 02713a0ff..d63f7d602 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 d96ff5325..2a513563c 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 4593eaa4a..35f55d9ce 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 4ae569a63..0ee049342 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 1241d02ca..c2e9f68a1 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 04aee7d55..2be19f9c2 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 338481881..e46cebcb2 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 9cbff4f90..e918ca6cd 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 beabf2ebe..cfd9807f6 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 a23dd4bca..cf7a2a230 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 2325e5d9d..fc5a02722 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 fa750a680..e99d1d0d8 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 7af5436be..230bb091e 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 4638c4dd1..6266ab239 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 f5a5d87e5..1c83f7279 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 bec55b8ac..2c633406d 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 7965ac8ba..94f857785 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 2b60c3b92..d214f889a 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 faad167d5..9d6452eda 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 4ac23fbe6..3ef63b533 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 96105e634..2da46e5b0 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 19431a9b9..6602b9618 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 9d4304840..6fb5905c3 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 ccb5877e0..a10705273 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 e53ee8b72..a85f8dc7d 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 5de966670..270d5549b 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 6a1a2bbe6..7fe01a105 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 bc9f796dc..9fa6b4726 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 10e1d9d7f..427e7950e 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 6e0775820..605e673ff 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 c06c703a3..7208133d2 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 f0df1afa2..a159796da 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 5d6f959cc..87c1e1678 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 2fbd8ddfb..ad79adf31 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 2f261a0d4..c62170128 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 3f97a212d..9f712c2da 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 f53b8fe50..c040001d7 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 4a484035f..6877cf602 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 eff894517..394f44d48 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 cc116d655..f14a02e5d 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 3f919569c..db711efbb 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 fecdfc956..d6891f704 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 49a4be4ad..1063eb226 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 88f916161..328d6725a 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 d14f5bc0a..cad1cd218 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 fd361bf8d..beb39c5b8 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 6ef3a38cd..8875f96ee 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 9a10529b2..58f9e0cc2 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 70b131225..c0b9f7eb2 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 1f25244b5..d5d900616 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 40247b871..1f91d30a2 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 dd873bcfa..822a3d762 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 0fb1990ee..22d508b40 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 b66a02a0b..796260e4c 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 956ec8853..188c2bac3 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 5a8f75446..845b78772 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 16ffb6337..fc06138b6 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 4966b0582..dd661836f 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 4c80c9159..2d749363c 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 2beeb1dd0..8ed8237f5 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 137e6b834..092e0178d 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 62e287f94..9ebe27fa6 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 162b919e4..4aee9e246 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt @@ -25,7 +25,7 @@ fun syncChaptersWithSource( db: DatabaseHelper, rawSourceChapters: List, manga: Manga, - source: Source + source: Source, ): Pair, List> { if (rawSourceChapters.isEmpty()) { throw NoChaptersException() diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt index 33368e44a..170491595 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 bc1d9a801..8d368cbc6 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 50f6d02ff..c44f740b0 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 0b648a137..1cda71267 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 c0e8a971d..1fd0a2ec7 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 e541f52b1..5e2e9c525 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 9b44dbcdb..70e44d645 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 5ccbb4f7e..df3aa3dce 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 5df8fcb33..e70e9281d 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 338ac8a79..28b197af5 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 9086752a4..21dd1f294 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 a3f2fdfbb..f1dfe7f12 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 a4b7a43dd..fa71554a1 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 ed6c62275..3b4618ad9 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 d2c21c8d6..0b9ca04d9 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 b7ab3a82f..e5125a28c 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 c8ed0a104..45453a93c 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 e54379e01..eb3ced1f8 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 836715b70..da42cdbee 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 91aade2ee..2667b5659 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 90516828e..e7d7db22c 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 b4f01a19e..cc913f618 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 275f112bc..0bbd328a6 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 e0bde8512..51bf2ec4f 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 da8b93d91..c9135bd25 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 fb4bff7dd..c6ee7f914 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 fc427b185..c75c21604 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 f14ec107f..6d46885cd 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 15d64392a..ab97896e3 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 38e71410f..4c5bd324d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreferenceAdapter.kt @@ -25,7 +25,7 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) : override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ThemeViewHolder { val themeResIds = ThemingDelegate.getThemeResIds(themes[viewType], preferences.themeDarkAmoled().get()) val themedContext = themeResIds.fold(parent.context) { - context, themeResId -> + context, themeResId -> ContextThemeWrapper(context, themeResId) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt index af8be9aaf..8b05e7026 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 5a2116d03..a86d9bf8c 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 e1422c7c8..000000000 --- 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