From 5afff31f7246d0ede03344c955a47f4817e9fb92 Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 8 Apr 2022 16:44:23 -0400 Subject: [PATCH] Formatting --- app/src/main/java/eu/kanade/tachiyomi/App.kt | 4 +-- .../tachiyomi/data/backup/BackupCreatorJob.kt | 4 +-- .../tachiyomi/data/backup/BackupNotifier.kt | 10 +++--- .../data/backup/full/FullBackupManager.kt | 2 +- .../data/backup/full/models/BackupCategory.kt | 2 +- .../data/backup/full/models/BackupChapter.kt | 2 +- .../data/backup/full/models/BackupManga.kt | 2 +- .../data/backup/full/models/BackupSource.kt | 2 +- .../data/backup/full/models/BackupTracking.kt | 2 +- .../data/backup/legacy/LegacyBackupRestore.kt | 2 +- .../legacy/LegacyBackupRestoreValidator.kt | 2 +- .../serializer/CategoryTypeSerializer.kt | 2 +- .../serializer/ChapterTypeSerializer.kt | 2 +- .../serializer/HistoryTypeSerializer.kt | 4 +-- .../legacy/serializer/MangaTypeSerializer.kt | 2 +- .../legacy/serializer/TrackTypeSerializer.kt | 2 +- .../tachiyomi/data/cache/ChapterCache.kt | 2 +- .../tachiyomi/data/coil/MangaCoverFetcher.kt | 8 ++--- .../data/coil/TachiyomiImageDecoder.kt | 2 +- .../tachiyomi/data/database/DbOpenCallback.kt | 2 +- .../database/mappers/CategoryTypeMapping.kt | 4 +-- .../database/mappers/ChapterTypeMapping.kt | 4 +-- .../database/mappers/HistoryTypeMapping.kt | 4 +-- .../mappers/MangaCategoryTypeMapping.kt | 4 +-- .../data/database/mappers/MangaTypeMapping.kt | 4 +-- .../data/database/mappers/TrackTypeMapping.kt | 4 +-- .../tachiyomi/data/database/models/Manga.kt | 2 +- .../data/database/queries/CategoryQueries.kt | 4 +-- .../data/database/queries/ChapterQueries.kt | 10 +++--- .../data/database/queries/HistoryQueries.kt | 10 +++--- .../database/queries/MangaCategoryQueries.kt | 2 +- .../data/database/queries/MangaQueries.kt | 24 ++++++------- .../data/database/queries/TrackQueries.kt | 6 ++-- .../resolvers/ChapterBackupPutResolver.kt | 2 +- .../ChapterKnownBackupPutResolver.kt | 2 +- .../resolvers/ChapterProgressPutResolver.kt | 2 +- .../ChapterSourceOrderPutResolver.kt | 2 +- .../resolvers/HistoryLastReadPutResolver.kt | 4 +-- .../MangaCoverLastModifiedPutResolver.kt | 2 +- .../resolvers/MangaFavoritePutResolver.kt | 2 +- .../resolvers/MangaFlagsPutResolver.kt | 2 +- .../resolvers/MangaLastUpdatedPutResolver.kt | 2 +- .../resolvers/MangaTitlePutResolver.kt | 2 +- .../data/download/DownloadNotifier.kt | 10 +++--- .../data/download/DownloadProvider.kt | 4 +-- .../tachiyomi/data/download/Downloader.kt | 4 +-- .../data/library/LibraryUpdateJob.kt | 2 +- .../data/library/LibraryUpdateNotifier.kt | 26 +++++++------- .../data/library/LibraryUpdateService.kt | 12 +++---- .../data/notification/NotificationReceiver.kt | 12 +++---- .../data/notification/Notifications.kt | 10 +++--- .../data/preference/PreferencesHelper.kt | 12 +++---- .../kanade/tachiyomi/data/saver/ImageSaver.kt | 8 ++--- .../data/track/anilist/AnilistApi.kt | 24 ++++++------- .../data/track/bangumi/BangumiApi.kt | 8 ++--- .../data/track/bangumi/BangumiInterceptor.kt | 4 +-- .../data/track/job/DelayedTrackingStore.kt | 2 +- .../tachiyomi/data/track/kitsu/KitsuApi.kt | 20 +++++------ .../tachiyomi/data/track/komga/KomgaApi.kt | 2 +- .../tachiyomi/data/track/komga/KomgaModels.kt | 2 +- .../data/track/myanimelist/MyAnimeListApi.kt | 2 +- .../data/track/shikimori/ShikimoriApi.kt | 8 ++--- .../tachiyomi/data/updater/AppUpdateJob.kt | 2 +- .../data/updater/AppUpdateNotifier.kt | 12 +++---- .../tachiyomi/extension/ExtensionUpdateJob.kt | 8 ++--- .../extension/api/ExtensionGithubApi.kt | 4 +-- .../installer/PackageInstallerInstaller.kt | 2 +- .../extension/util/ExtensionInstaller.kt | 2 +- .../extension/util/ExtensionLoader.kt | 4 +-- .../kanade/tachiyomi/network/DohProviders.kt | 16 ++++----- .../tachiyomi/network/OkHttpExtensions.kt | 2 +- .../eu/kanade/tachiyomi/source/LocalSource.kt | 6 ++-- .../java/eu/kanade/tachiyomi/source/Source.kt | 6 ++-- .../kanade/tachiyomi/source/SourceManager.kt | 2 +- .../eu/kanade/tachiyomi/source/model/Page.kt | 4 +-- .../kanade/tachiyomi/source/model/SChapter.kt | 2 +- .../kanade/tachiyomi/source/model/SManga.kt | 2 +- .../ui/base/controller/BaseController.kt | 4 +-- .../ui/base/controller/DialogController.kt | 2 +- .../controller/OneWayFadeChangeHandler.kt | 2 +- .../controller/SearchableNucleusController.kt | 6 ++-- .../tachiyomi/ui/browse/BrowseController.kt | 4 +-- .../browse/extension/ExtensionController.kt | 4 +-- .../ui/browse/extension/ExtensionHolder.kt | 2 +- .../ui/browse/extension/ExtensionPresenter.kt | 4 +-- .../browse/extension/ExtensionTrustDialog.kt | 4 +-- .../details/ExtensionDetailsController.kt | 6 ++-- .../details/ExtensionDetailsPresenter.kt | 2 +- .../details/SourcePreferencesController.kt | 6 ++-- .../manga/MigrationMangaController.kt | 6 ++-- .../migration/search/SearchController.kt | 2 +- .../migration/search/SearchPresenter.kt | 8 ++--- .../search/SourceSearchController.kt | 2 +- .../migration/sources/SelectionHeader.kt | 2 +- .../ui/browse/migration/sources/SourceItem.kt | 2 +- .../ui/browse/source/SourceController.kt | 8 ++--- .../browse/source/SourceFilterController.kt | 4 +-- .../source/browse/BrowseSourceController.kt | 10 +++--- .../source/browse/BrowseSourcePresenter.kt | 2 +- .../browse/source/browse/SourceFilterSheet.kt | 2 +- .../ui/browse/source/filter/GroupItem.kt | 2 +- .../ui/browse/source/filter/SelectItem.kt | 2 +- .../ui/browse/source/filter/SortGroup.kt | 2 +- .../ui/browse/source/filter/TriStateItem.kt | 2 +- .../globalsearch/GlobalSearchController.kt | 2 +- .../globalsearch/GlobalSearchPresenter.kt | 12 +++---- .../source/latest/LatestUpdatesController.kt | 2 +- .../ui/category/CategoryController.kt | 2 +- .../tachiyomi/ui/download/DownloadAdapter.kt | 2 +- .../ui/download/DownloadController.kt | 4 +-- .../tachiyomi/ui/download/DownloadHolder.kt | 2 +- .../ui/library/ChangeMangaCategoriesDialog.kt | 2 +- .../ui/library/DeleteLibraryMangasDialog.kt | 2 +- .../tachiyomi/ui/library/LibraryController.kt | 6 ++-- .../tachiyomi/ui/library/LibraryPresenter.kt | 4 +-- .../ui/library/LibrarySettingsSheet.kt | 4 +-- .../kanade/tachiyomi/ui/main/MainActivity.kt | 4 +-- .../tachiyomi/ui/manga/MangaController.kt | 34 +++++++++--------- .../tachiyomi/ui/manga/MangaPresenter.kt | 10 +++--- .../ui/manga/chapter/ChaptersAdapter.kt | 2 +- .../ui/manga/chapter/ChaptersSettingsSheet.kt | 6 ++-- .../chapter/DownloadCustomChaptersDialog.kt | 2 +- .../manga/chapter/SetChapterSettingsDialog.kt | 2 +- .../manga/chapter/base/BaseChapterHolder.kt | 2 +- .../ui/manga/info/MangaFullCoverDialog.kt | 4 +-- .../ui/manga/info/MangaInfoHeaderAdapter.kt | 10 +++--- .../ui/manga/track/SetTrackChaptersDialog.kt | 2 +- .../ui/manga/track/SetTrackScoreDialog.kt | 2 +- .../ui/manga/track/SetTrackStatusDialog.kt | 2 +- .../tachiyomi/ui/more/AboutController.kt | 2 +- .../ui/more/NewUpdateDialogController.kt | 2 +- .../ui/reader/PageIndicatorTextView.kt | 2 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 36 +++++++++---------- .../tachiyomi/ui/reader/ReaderPresenter.kt | 26 +++++++------- .../tachiyomi/ui/reader/SaveImageNotifier.kt | 6 ++-- .../ui/reader/loader/EpubPageLoader.kt | 2 +- .../ui/reader/loader/HttpPageLoader.kt | 2 +- .../ui/reader/loader/RarPageLoader.kt | 2 +- .../ui/reader/loader/ZipPageLoader.kt | 2 +- .../ui/reader/setting/ReaderSettingsSheet.kt | 6 ++-- .../ui/reader/viewer/ReaderPageImageView.kt | 12 +++---- .../reader/viewer/ReaderProgressIndicator.kt | 2 +- .../ui/reader/viewer/ViewerNavigation.kt | 2 +- .../viewer/navigation/EdgeNavigation.kt | 8 ++--- .../viewer/navigation/KindlishNavigation.kt | 6 ++-- .../reader/viewer/navigation/LNavigation.kt | 10 +++--- .../navigation/RightAndLeftNavigation.kt | 6 ++-- .../ui/reader/viewer/pager/PagerConfig.kt | 4 +-- .../ui/reader/viewer/pager/PagerPageHolder.kt | 4 +-- .../ui/reader/viewer/pager/PagerViewer.kt | 2 +- .../viewer/webtoon/WebtoonPageHolder.kt | 4 +-- .../viewer/webtoon/WebtoonRecyclerView.kt | 2 +- .../ui/reader/viewer/webtoon/WebtoonViewer.kt | 4 +-- .../ui/recent/history/HistoryAdapter.kt | 2 +- .../ui/recent/history/HistoryController.kt | 2 +- .../ui/recent/history/HistoryHolder.kt | 2 +- .../ui/recent/history/HistoryPresenter.kt | 4 +-- .../ui/recent/updates/UpdatesHolder.kt | 2 +- .../ui/recent/updates/UpdatesPresenter.kt | 4 +-- .../tachiyomi/ui/security/UnlockActivity.kt | 2 +- .../ui/setting/SettingsAdvancedController.kt | 4 +-- .../setting/SettingsAppearanceController.kt | 10 +++--- .../ui/setting/SettingsBackupController.kt | 6 ++-- .../ui/setting/SettingsBrowseController.kt | 2 +- .../ui/setting/SettingsDownloadController.kt | 4 +-- .../ui/setting/SettingsGeneralController.kt | 2 +- .../ui/setting/SettingsLibraryController.kt | 4 +-- .../ui/setting/SettingsMainController.kt | 2 +- .../ui/setting/SettingsReaderController.kt | 20 +++++------ .../ui/setting/SettingsSecurityController.kt | 4 +-- .../ui/setting/SettingsTrackingController.kt | 2 +- .../search/SettingsSearchController.kt | 4 +-- .../ui/setting/search/SettingsSearchHelper.kt | 6 ++-- .../setting/track/BaseOAuthLoginActivity.kt | 4 +-- .../eu/kanade/tachiyomi/util/CrashLogUtil.kt | 4 +-- .../tachiyomi/util/lang/DateExtensions.kt | 6 ++-- .../eu/kanade/tachiyomi/util/lang/Hash.kt | 2 +- .../tachiyomi/util/lang/RxCoroutineBridge.kt | 10 +++--- .../util/preference/PreferenceDSL.kt | 4 +-- .../util/system/AuthenticatorUtil.kt | 2 +- .../kanade/tachiyomi/util/system/ImageUtil.kt | 2 +- .../util/system/WebViewClientCompat.kt | 4 +-- .../util/view/ImageViewExtensions.kt | 2 +- .../tachiyomi/util/view/ViewExtensions.kt | 2 +- .../tachiyomi/util/view/WindowExtensions.kt | 2 +- .../tachiyomi/widget/ActionModeWithToolbar.kt | 2 +- .../eu/kanade/tachiyomi/widget/EmptyView.kt | 6 ++-- .../HideBottomNavigationOnScrollBehavior.kt | 2 +- .../tachiyomi/widget/MangaSummaryView.kt | 6 ++-- .../tachiyomi/widget/MaterialFastScroll.kt | 2 +- .../tachiyomi/widget/SimpleNavigationView.kt | 2 +- .../widget/TachiyomiBottomNavigationView.kt | 6 ++-- .../MaterialAlertDialogBuilderExtensions.kt | 2 +- .../QuadStateMultiChoiceDialogAdapter.kt | 2 +- .../preference/SwitchPreferenceCategory.kt | 4 +-- .../widget/preference/ThemesPreference.kt | 4 +-- .../widget/sheet/BottomSheetViewPager.kt | 2 +- 197 files changed, 481 insertions(+), 483 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index ca58e8485..907995138 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -93,7 +93,7 @@ open class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { this@App, 0, Intent(ACTION_DISABLE_INCOGNITO_MODE), - PendingIntent.FLAG_ONE_SHOT + PendingIntent.FLAG_ONE_SHOT, ) setContentIntent(pendingIntent) } @@ -112,7 +112,7 @@ open class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory { PreferenceValues.ThemeMode.light -> AppCompatDelegate.MODE_NIGHT_NO PreferenceValues.ThemeMode.dark -> AppCompatDelegate.MODE_NIGHT_YES PreferenceValues.ThemeMode.system -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM - } + }, ) }.launchIn(ProcessLifecycleOwner.get().lifecycleScope) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt index 489bc0ded..cff2ebde7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreatorJob.kt @@ -63,7 +63,7 @@ class BackupCreatorJob(private val context: Context, workerParams: WorkerParamet interval.toLong(), TimeUnit.HOURS, 10, - TimeUnit.MINUTES + TimeUnit.MINUTES, ) .addTag(TAG_AUTO) .setInputData(workDataOf(IS_AUTO_BACKUP_KEY to true)) @@ -79,7 +79,7 @@ class BackupCreatorJob(private val context: Context, workerParams: WorkerParamet val inputData = workDataOf( IS_AUTO_BACKUP_KEY to false, LOCATION_URI_KEY to uri.toString(), - BACKUP_FLAGS_KEY to flags + BACKUP_FLAGS_KEY to flags, ) val request = OneTimeWorkRequestBuilder() .addTag(TAG_MANUAL) 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 41e5f77a2..3ab6366df 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 @@ -73,7 +73,7 @@ class BackupNotifier(private val context: Context) { addAction( R.drawable.ic_share_24dp, context.getString(R.string.action_share), - NotificationReceiver.shareBackupPendingBroadcast(context, unifile.uri, Notifications.ID_BACKUP_COMPLETE) + NotificationReceiver.shareBackupPendingBroadcast(context, unifile.uri, Notifications.ID_BACKUP_COMPLETE), ) show(Notifications.ID_BACKUP_COMPLETE) @@ -97,7 +97,7 @@ class BackupNotifier(private val context: Context) { addAction( R.drawable.ic_close_24dp, context.getString(R.string.action_stop), - NotificationReceiver.cancelRestorePendingBroadcast(context, Notifications.ID_RESTORE_PROGRESS) + NotificationReceiver.cancelRestorePendingBroadcast(context, Notifications.ID_RESTORE_PROGRESS), ) } @@ -124,8 +124,8 @@ class BackupNotifier(private val context: Context) { R.string.restore_duration, TimeUnit.MILLISECONDS.toMinutes(time), TimeUnit.MILLISECONDS.toSeconds(time) - TimeUnit.MINUTES.toSeconds( - TimeUnit.MILLISECONDS.toMinutes(time) - ) + TimeUnit.MILLISECONDS.toMinutes(time), + ), ) with(completeNotificationBuilder) { @@ -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/FullBackupManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt index aaa1f03b4..ca15125ae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt @@ -56,7 +56,7 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) { backupManga(databaseManga, flags), backupCategories(), emptyList(), - backupExtensionInfo(databaseManga) + backupExtensionInfo(databaseManga), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupCategory.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupCategory.kt index e1d543eda..96cb2b7d1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupCategory.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupCategory.kt @@ -26,7 +26,7 @@ class BackupCategory( return BackupCategory( name = category.name, order = category.order, - flags = category.flags + flags = category.flags, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt index 05111123b..ca5214533 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt @@ -49,7 +49,7 @@ data class BackupChapter( lastPageRead = chapter.last_page_read, dateFetch = chapter.date_fetch, dateUpload = chapter.date_upload, - sourceOrder = chapter.source_order + sourceOrder = chapter.source_order, ) } } 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 242a59cd7..fcc24626a 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 @@ -83,7 +83,7 @@ data class BackupManga( dateAdded = manga.date_added, viewer = manga.readingModeType, viewer_flags = manga.viewer_flags, - chapterFlags = manga.chapter_flags + chapterFlags = manga.chapter_flags, ) } } 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 ecda179c4..8c823f71c 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 @@ -19,7 +19,7 @@ data class BackupSource( fun copyFrom(source: Source): BackupSource { return BackupSource( name = source.name, - sourceId = source.id + sourceId = source.id, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt index 9a8c2ea45..2ef022d5d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt @@ -56,7 +56,7 @@ data class BackupTracking( status = track.status, startedReadingDate = track.started_reading_date, finishedReadingDate = track.finished_reading_date, - trackingUrl = track.tracking_url + trackingUrl = track.tracking_url, ) } } 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 8cedb9aff..971cf1d34 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 @@ -28,7 +28,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract // Read the json and create a Json Object, // cannot use the backupManager json deserializer one because its not initialized yet val backupObject = Json.decodeFromStream( - context.contentResolver.openInputStream(uri)!! + context.contentResolver.openInputStream(uri)!!, ) // Get parser version diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestoreValidator.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestoreValidator.kt index d1dafb6ce..0f1410817 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestoreValidator.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/LegacyBackupRestoreValidator.kt @@ -21,7 +21,7 @@ class LegacyBackupRestoreValidator : AbstractBackupRestoreValidator() { val backup = try { backupManager.parser.decodeFromStream( - context.contentResolver.openInputStream(uri)!! + context.contentResolver.openInputStream(uri)!!, ) } catch (e: Exception) { throw ValidatorParseException(e) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/CategoryTypeSerializer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/CategoryTypeSerializer.kt index b5f52a1bb..ab6861bb2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/CategoryTypeSerializer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/CategoryTypeSerializer.kt @@ -27,7 +27,7 @@ open class CategoryBaseSerializer : KSerializer { buildJsonArray { add(value.name) add(value.order) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/ChapterTypeSerializer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/ChapterTypeSerializer.kt index 02f52362f..a1ae4a6bf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/ChapterTypeSerializer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/ChapterTypeSerializer.kt @@ -35,7 +35,7 @@ open class ChapterBaseSerializer : KSerializer { if (value.last_page_read != 0) { put(LAST_READ, value.last_page_read) } - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/HistoryTypeSerializer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/HistoryTypeSerializer.kt index ba19803ed..7cbc7a452 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/HistoryTypeSerializer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/HistoryTypeSerializer.kt @@ -26,7 +26,7 @@ object HistoryTypeSerializer : KSerializer { buildJsonArray { add(value.url) add(value.lastRead) - } + }, ) } @@ -35,7 +35,7 @@ object HistoryTypeSerializer : KSerializer { val array = decoder.decodeJsonElement().jsonArray return DHistory( url = array[0].jsonPrimitive.content, - lastRead = array[1].jsonPrimitive.long + lastRead = array[1].jsonPrimitive.long, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/MangaTypeSerializer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/MangaTypeSerializer.kt index 1224b3cd5..bec833ab9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/MangaTypeSerializer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/MangaTypeSerializer.kt @@ -31,7 +31,7 @@ open class MangaBaseSerializer : KSerializer { add(value.source) add(value.viewer_flags) add(value.chapter_flags) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/TrackTypeSerializer.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/TrackTypeSerializer.kt index 1c259dd06..4691e9a86 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/TrackTypeSerializer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/serializer/TrackTypeSerializer.kt @@ -33,7 +33,7 @@ open class TrackBaseSerializer : KSerializer { put(LIBRARY, value.library_id) put(LAST_READ, value.last_chapter_read) put(TRACKING_URL, value.tracking_url) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/cache/ChapterCache.kt b/app/src/main/java/eu/kanade/tachiyomi/data/cache/ChapterCache.kt index a6227bf7d..4d9444d3f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/cache/ChapterCache.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/cache/ChapterCache.kt @@ -49,7 +49,7 @@ class ChapterCache(private val context: Context) { File(context.cacheDir, PARAMETER_CACHE_DIRECTORY), PARAMETER_APP_VERSION, PARAMETER_VALUE_COUNT, - PARAMETER_CACHE_SIZE + PARAMETER_CACHE_SIZE, ) /** 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 0de0f6ab9..978765c43 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 @@ -75,7 +75,7 @@ class MangaCoverFetcher( return SourceResult( source = ImageSource(file = file.toOkioPath(), diskCacheKey = diskCacheKey), mimeType = "image/*", - dataSource = DataSource.DISK + dataSource = DataSource.DISK, ) } @@ -104,7 +104,7 @@ class MangaCoverFetcher( return SourceResult( source = snapshot.toImageSource(), mimeType = "image/*", - dataSource = DataSource.DISK + dataSource = DataSource.DISK, ) } @@ -124,7 +124,7 @@ class MangaCoverFetcher( return SourceResult( source = snapshot.toImageSource(), mimeType = "image/*", - dataSource = DataSource.NETWORK + dataSource = DataSource.NETWORK, ) } @@ -132,7 +132,7 @@ class MangaCoverFetcher( return SourceResult( source = ImageSource(source = responseBody.source(), context = options.context), mimeType = "image/*", - dataSource = if (response.cacheResponse != null) DataSource.DISK else DataSource.NETWORK + dataSource = if (response.cacheResponse != null) DataSource.DISK else DataSource.NETWORK, ) } catch (e: Exception) { responseBody.closeQuietly() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt index b8545b963..160782bc1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt @@ -32,7 +32,7 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti return DecodeResult( drawable = bitmap.toDrawable(options.context.resources), - isSampled = false + isSampled = false, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt index 95a20e557..31702be03 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt @@ -46,7 +46,7 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(DATABASE_VERSION) { // Fix kissmanga covers after supporting cloudflare db.execSQL( """UPDATE mangas SET thumbnail_url = - REPLACE(thumbnail_url, '93.174.95.110', 'kissmanga.com') WHERE source = 4""" + REPLACE(thumbnail_url, '93.174.95.110', 'kissmanga.com') WHERE source = 4""", ) } if (oldVersion < 3) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/CategoryTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/CategoryTypeMapping.kt index 858a9e4fd..3201e243f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/CategoryTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/CategoryTypeMapping.kt @@ -20,7 +20,7 @@ import eu.kanade.tachiyomi.data.database.tables.CategoryTable.TABLE class CategoryTypeMapping : SQLiteTypeMapping( CategoryPutResolver(), CategoryGetResolver(), - CategoryDeleteResolver() + CategoryDeleteResolver(), ) class CategoryPutResolver : DefaultPutResolver() { @@ -40,7 +40,7 @@ class CategoryPutResolver : DefaultPutResolver() { COL_ID to obj.id, COL_NAME to obj.name, COL_ORDER to obj.order, - COL_FLAGS to obj.flags + COL_FLAGS to obj.flags, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/ChapterTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/ChapterTypeMapping.kt index 52a353f04..d56fe36d0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/ChapterTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/ChapterTypeMapping.kt @@ -28,7 +28,7 @@ import eu.kanade.tachiyomi.data.database.tables.ChapterTable.TABLE class ChapterTypeMapping : SQLiteTypeMapping( ChapterPutResolver(), ChapterGetResolver(), - ChapterDeleteResolver() + ChapterDeleteResolver(), ) class ChapterPutResolver : DefaultPutResolver() { @@ -56,7 +56,7 @@ class ChapterPutResolver : DefaultPutResolver() { COL_DATE_UPLOAD to obj.date_upload, COL_LAST_PAGE_READ to obj.last_page_read, COL_CHAPTER_NUMBER to obj.chapter_number, - COL_SOURCE_ORDER to obj.source_order + COL_SOURCE_ORDER to obj.source_order, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/HistoryTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/HistoryTypeMapping.kt index 896881cbd..836eb3c13 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/HistoryTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/HistoryTypeMapping.kt @@ -20,7 +20,7 @@ import eu.kanade.tachiyomi.data.database.tables.HistoryTable.TABLE class HistoryTypeMapping : SQLiteTypeMapping( HistoryPutResolver(), HistoryGetResolver(), - HistoryDeleteResolver() + HistoryDeleteResolver(), ) open class HistoryPutResolver : DefaultPutResolver() { @@ -40,7 +40,7 @@ open class HistoryPutResolver : DefaultPutResolver() { COL_ID to obj.id, COL_CHAPTER_ID to obj.chapter_id, COL_LAST_READ to obj.last_read, - COL_TIME_READ to obj.time_read + COL_TIME_READ to obj.time_read, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaCategoryTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaCategoryTypeMapping.kt index 93950fbf6..abd807f2f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaCategoryTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaCategoryTypeMapping.kt @@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.data.database.tables.MangaCategoryTable.TABLE class MangaCategoryTypeMapping : SQLiteTypeMapping( MangaCategoryPutResolver(), MangaCategoryGetResolver(), - MangaCategoryDeleteResolver() + MangaCategoryDeleteResolver(), ) class MangaCategoryPutResolver : DefaultPutResolver() { @@ -37,7 +37,7 @@ class MangaCategoryPutResolver : DefaultPutResolver() { contentValuesOf( COL_ID to obj.id, COL_MANGA_ID to obj.manga_id, - COL_CATEGORY_ID to obj.category_id + COL_CATEGORY_ID to obj.category_id, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaTypeMapping.kt index 3d7c34f4d..00d305653 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/MangaTypeMapping.kt @@ -33,7 +33,7 @@ import eu.kanade.tachiyomi.data.database.tables.MangaTable.TABLE class MangaTypeMapping : SQLiteTypeMapping( MangaPutResolver(), MangaGetResolver(), - MangaDeleteResolver() + MangaDeleteResolver(), ) class MangaPutResolver : DefaultPutResolver() { @@ -66,7 +66,7 @@ class MangaPutResolver : DefaultPutResolver() { COL_VIEWER to obj.viewer_flags, COL_CHAPTER_FLAGS to obj.chapter_flags, COL_COVER_LAST_MODIFIED to obj.cover_last_modified, - COL_DATE_ADDED to obj.date_added + COL_DATE_ADDED to obj.date_added, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/TrackTypeMapping.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/TrackTypeMapping.kt index ab9477862..24ca7c26e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/TrackTypeMapping.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/mappers/TrackTypeMapping.kt @@ -29,7 +29,7 @@ import eu.kanade.tachiyomi.data.database.tables.TrackTable.TABLE class TrackTypeMapping : SQLiteTypeMapping( TrackPutResolver(), TrackGetResolver(), - TrackDeleteResolver() + TrackDeleteResolver(), ) class TrackPutResolver : DefaultPutResolver() { @@ -58,7 +58,7 @@ class TrackPutResolver : DefaultPutResolver() { COL_TRACKING_URL to obj.tracking_url, COL_SCORE to obj.score, COL_START_DATE to obj.started_reading_date, - COL_FINISH_DATE to obj.finished_reading_date + COL_FINISH_DATE to obj.finished_reading_date, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt index 2b0756637..35efbe1ff 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt @@ -125,6 +125,6 @@ fun Manga.toMangaInfo(): MangaInfo { genres = this.getGenres() ?: emptyList(), key = this.url, status = this.status, - title = this.title + title = this.title, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/CategoryQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/CategoryQueries.kt index bf769b154..f940a50c7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/CategoryQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/CategoryQueries.kt @@ -15,7 +15,7 @@ interface CategoryQueries : DbProvider { Query.builder() .table(CategoryTable.TABLE) .orderBy(CategoryTable.COL_ORDER) - .build() + .build(), ) .prepare() @@ -25,7 +25,7 @@ interface CategoryQueries : DbProvider { RawQuery.builder() .query(getCategoriesForMangaQuery()) .args(manga.id) - .build() + .build(), ) .prepare() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/ChapterQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/ChapterQueries.kt index 948ab9654..5fe19c895 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/ChapterQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/ChapterQueries.kt @@ -23,7 +23,7 @@ interface ChapterQueries : DbProvider { .table(ChapterTable.TABLE) .where("${ChapterTable.COL_MANGA_ID} = ?") .whereArgs(manga.id) - .build() + .build(), ) .prepare() @@ -34,7 +34,7 @@ interface ChapterQueries : DbProvider { .query(getRecentsQuery()) .args(date.time) .observesTables(ChapterTable.TABLE) - .build() + .build(), ) .withGetResolver(MangaChapterGetResolver.INSTANCE) .prepare() @@ -46,7 +46,7 @@ interface ChapterQueries : DbProvider { .table(ChapterTable.TABLE) .where("${ChapterTable.COL_ID} = ?") .whereArgs(id) - .build() + .build(), ) .prepare() @@ -57,7 +57,7 @@ interface ChapterQueries : DbProvider { .table(ChapterTable.TABLE) .where("${ChapterTable.COL_URL} = ?") .whereArgs(url) - .build() + .build(), ) .prepare() @@ -68,7 +68,7 @@ interface ChapterQueries : DbProvider { .table(ChapterTable.TABLE) .where("${ChapterTable.COL_URL} = ? AND ${ChapterTable.COL_MANGA_ID} = ?") .whereArgs(url, mangaId) - .build() + .build(), ) .prepare() diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/HistoryQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/HistoryQueries.kt index bcf27cc29..24b57f48e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/HistoryQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/HistoryQueries.kt @@ -32,7 +32,7 @@ interface HistoryQueries : DbProvider { .query(getRecentMangasQuery(search)) .args(date.time, limit, offset) .observesTables(HistoryTable.TABLE) - .build() + .build(), ) .withGetResolver(MangaChapterHistoryGetResolver.INSTANCE) .prepare() @@ -44,7 +44,7 @@ interface HistoryQueries : DbProvider { .query(getHistoryByMangaId()) .args(mangaId) .observesTables(HistoryTable.TABLE) - .build() + .build(), ) .prepare() @@ -55,7 +55,7 @@ interface HistoryQueries : DbProvider { .query(getHistoryByChapterUrl()) .args(chapterUrl) .observesTables(HistoryTable.TABLE) - .build() + .build(), ) .prepare() @@ -83,7 +83,7 @@ interface HistoryQueries : DbProvider { .byQuery( DeleteQuery.builder() .table(HistoryTable.TABLE) - .build() + .build(), ) .prepare() @@ -93,7 +93,7 @@ interface HistoryQueries : DbProvider { .table(HistoryTable.TABLE) .where("${HistoryTable.COL_LAST_READ} = ?") .whereArgs(0) - .build() + .build(), ) .prepare() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaCategoryQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaCategoryQueries.kt index 9330f4923..571cd23aa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaCategoryQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/MangaCategoryQueries.kt @@ -20,7 +20,7 @@ interface MangaCategoryQueries : DbProvider { .table(MangaCategoryTable.TABLE) .where("${MangaCategoryTable.COL_MANGA_ID} IN (${Queries.placeholders(mangas.size)})") .whereArgs(*mangas.map { it.id }.toTypedArray()) - .build() + .build(), ) .prepare() 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 5eb703038..54bf42968 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 @@ -29,7 +29,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(libraryQuery) .observesTables(MangaTable.TABLE, ChapterTable.TABLE, MangaCategoryTable.TABLE, CategoryTable.TABLE) - .build() + .build(), ) .withGetResolver(LibraryMangaGetResolver.INSTANCE) .prepare() @@ -42,10 +42,10 @@ 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() + .build(), ) .prepare() @@ -72,7 +72,7 @@ interface MangaQueries : DbProvider { .table(MangaTable.TABLE) .where("${MangaTable.COL_URL} = ? AND ${MangaTable.COL_SOURCE} = ?") .whereArgs(url, sourceId) - .build() + .build(), ) .prepare() @@ -83,7 +83,7 @@ interface MangaQueries : DbProvider { .table(MangaTable.TABLE) .where("${MangaTable.COL_ID} = ?") .whereArgs(id) - .build() + .build(), ) .prepare() @@ -93,7 +93,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(getSourceIdsWithNonLibraryMangaQuery()) .observesTables(MangaTable.TABLE) - .build() + .build(), ) .withGetResolver(SourceIdMangaCountGetResolver.INSTANCE) .prepare() @@ -152,7 +152,7 @@ interface MangaQueries : DbProvider { .table(MangaTable.TABLE) .where("${MangaTable.COL_FAVORITE} = ? AND ${MangaTable.COL_SOURCE} IN (${Queries.placeholders(sourceIds.size)})") .whereArgs(0, *sourceIds.toTypedArray()) - .build() + .build(), ) .prepare() @@ -160,7 +160,7 @@ interface MangaQueries : DbProvider { .byQuery( DeleteQuery.builder() .table(MangaTable.TABLE) - .build() + .build(), ) .prepare() @@ -170,7 +170,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(getLastReadMangaQuery()) .observesTables(MangaTable.TABLE) - .build() + .build(), ) .prepare() @@ -180,7 +180,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(getTotalChapterMangaQuery()) .observesTables(MangaTable.TABLE) - .build() + .build(), ) .prepare() @@ -190,7 +190,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(getLatestChapterMangaQuery()) .observesTables(MangaTable.TABLE) - .build() + .build(), ) .prepare() @@ -200,7 +200,7 @@ interface MangaQueries : DbProvider { RawQuery.builder() .query(getChapterFetchDateMangaQuery()) .observesTables(MangaTable.TABLE) - .build() + .build(), ) .prepare() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/TrackQueries.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/TrackQueries.kt index 1947a0218..cd1fe8582 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/TrackQueries.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/queries/TrackQueries.kt @@ -15,7 +15,7 @@ interface TrackQueries : DbProvider { .withQuery( Query.builder() .table(TrackTable.TABLE) - .build() + .build(), ) .prepare() @@ -26,7 +26,7 @@ interface TrackQueries : DbProvider { .table(TrackTable.TABLE) .where("${TrackTable.COL_MANGA_ID} = ?") .whereArgs(manga.id) - .build() + .build(), ) .prepare() @@ -40,7 +40,7 @@ interface TrackQueries : DbProvider { .table(TrackTable.TABLE) .where("${TrackTable.COL_MANGA_ID} = ? AND ${TrackTable.COL_SYNC_ID} = ?") .whereArgs(manga.id, sync.id) - .build() + .build(), ) .prepare() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterBackupPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterBackupPutResolver.kt index 76516139f..7fb01a821 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterBackupPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterBackupPutResolver.kt @@ -29,6 +29,6 @@ class ChapterBackupPutResolver : PutResolver() { contentValuesOf( ChapterTable.COL_READ to chapter.read, ChapterTable.COL_BOOKMARK to chapter.bookmark, - ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read + ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterKnownBackupPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterKnownBackupPutResolver.kt index 5b8882e11..da62066c4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterKnownBackupPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterKnownBackupPutResolver.kt @@ -29,6 +29,6 @@ class ChapterKnownBackupPutResolver : PutResolver() { contentValuesOf( ChapterTable.COL_READ to chapter.read, ChapterTable.COL_BOOKMARK to chapter.bookmark, - ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read + ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterProgressPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterProgressPutResolver.kt index 949dcafd7..27a6838cc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterProgressPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterProgressPutResolver.kt @@ -29,6 +29,6 @@ class ChapterProgressPutResolver : PutResolver() { contentValuesOf( ChapterTable.COL_READ to chapter.read, ChapterTable.COL_BOOKMARK to chapter.bookmark, - ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read + ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterSourceOrderPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterSourceOrderPutResolver.kt index 9814e9dc5..1e39d6534 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterSourceOrderPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/ChapterSourceOrderPutResolver.kt @@ -27,6 +27,6 @@ class ChapterSourceOrderPutResolver : PutResolver() { fun mapToContentValues(chapter: Chapter) = contentValuesOf( - ChapterTable.COL_SOURCE_ORDER to chapter.source_order + ChapterTable.COL_SOURCE_ORDER to chapter.source_order, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/HistoryLastReadPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/HistoryLastReadPutResolver.kt index 8546c7e55..7bcba97f7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/HistoryLastReadPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/HistoryLastReadPutResolver.kt @@ -24,7 +24,7 @@ class HistoryLastReadPutResolver : HistoryPutResolver() { .table(updateQuery.table()) .where(updateQuery.where()) .whereArgs(updateQuery.whereArgs()) - .build() + .build(), ) cursor.use { putCursor -> @@ -47,6 +47,6 @@ class HistoryLastReadPutResolver : HistoryPutResolver() { private fun mapToUpdateContentValues(history: History) = contentValuesOf( - HistoryTable.COL_LAST_READ to history.last_read + HistoryTable.COL_LAST_READ to history.last_read, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaCoverLastModifiedPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaCoverLastModifiedPutResolver.kt index 0db595e42..6ab59168f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaCoverLastModifiedPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaCoverLastModifiedPutResolver.kt @@ -27,6 +27,6 @@ class MangaCoverLastModifiedPutResolver : PutResolver() { fun mapToContentValues(manga: Manga) = contentValuesOf( - MangaTable.COL_COVER_LAST_MODIFIED to manga.cover_last_modified + MangaTable.COL_COVER_LAST_MODIFIED to manga.cover_last_modified, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFavoritePutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFavoritePutResolver.kt index 29f93a19b..42890f3d5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFavoritePutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFavoritePutResolver.kt @@ -27,6 +27,6 @@ class MangaFavoritePutResolver : PutResolver() { fun mapToContentValues(manga: Manga) = contentValuesOf( - MangaTable.COL_FAVORITE to manga.favorite + MangaTable.COL_FAVORITE to manga.favorite, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFlagsPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFlagsPutResolver.kt index 7437e932e..a90784d82 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFlagsPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaFlagsPutResolver.kt @@ -28,6 +28,6 @@ class MangaFlagsPutResolver(private val colName: String, private val fieldGetter fun mapToContentValues(manga: Manga) = contentValuesOf( - colName to fieldGetter.get(manga) + colName to fieldGetter.get(manga), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaLastUpdatedPutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaLastUpdatedPutResolver.kt index 5cd673c6e..e2dcb22dc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaLastUpdatedPutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaLastUpdatedPutResolver.kt @@ -27,6 +27,6 @@ class MangaLastUpdatedPutResolver : PutResolver() { fun mapToContentValues(manga: Manga) = contentValuesOf( - MangaTable.COL_LAST_UPDATE to manga.last_update + MangaTable.COL_LAST_UPDATE to manga.last_update, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaTitlePutResolver.kt b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaTitlePutResolver.kt index 64323d276..5ffa22bef 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaTitlePutResolver.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/database/resolvers/MangaTitlePutResolver.kt @@ -27,6 +27,6 @@ class MangaTitlePutResolver : PutResolver() { fun mapToContentValues(manga: Manga) = contentValuesOf( - MangaTable.COL_TITLE to manga.title + MangaTable.COL_TITLE to manga.title, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt index e4a384c39..2d55f2df0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadNotifier.kt @@ -93,14 +93,14 @@ internal class DownloadNotifier(private val context: Context) { addAction( R.drawable.ic_pause_24dp, context.getString(R.string.action_pause), - NotificationReceiver.pauseDownloadsPendingBroadcast(context) + NotificationReceiver.pauseDownloadsPendingBroadcast(context), ) } val downloadingProgressText = context.getString( R.string.chapter_downloading_progress, download.downloadedImages, - download.pages!!.size + download.pages!!.size, ) if (preferences.hideNotificationContent()) { @@ -138,13 +138,13 @@ internal class DownloadNotifier(private val context: Context) { addAction( R.drawable.ic_play_arrow_24dp, context.getString(R.string.action_resume), - NotificationReceiver.resumeDownloadsPendingBroadcast(context) + NotificationReceiver.resumeDownloadsPendingBroadcast(context), ) // Clear action addAction( R.drawable.ic_close_24dp, context.getString(R.string.action_cancel_all), - NotificationReceiver.clearDownloadsPendingBroadcast(context) + NotificationReceiver.clearDownloadsPendingBroadcast(context), ) show(Notifications.ID_DOWNLOAD_CHAPTER_PROGRESS) @@ -213,7 +213,7 @@ internal class DownloadNotifier(private val context: Context) { // Create notification with(errorNotificationBuilder) { setContentTitle( - mangaTitle?.plus(": $chapter") ?: context.getString(R.string.download_notifier_downloader_title) + mangaTitle?.plus(": $chapter") ?: context.getString(R.string.download_notifier_downloader_title), ) setContentText(error ?: context.getString(R.string.download_notifier_unknown_error)) setSmallIcon(R.drawable.ic_warning_white_24dp) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index b13e84c95..e7ea310f6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -138,7 +138,7 @@ class DownloadProvider(private val context: Context) { when { chapter.scanlator != null -> "${chapter.scanlator}_${chapter.name}" else -> chapter.name - } + }, ) } @@ -157,7 +157,7 @@ class DownloadProvider(private val context: Context) { "$chapterName.cbz", // Legacy chapter directory name used in v0.9.2 and before - DiskUtil.buildValidFilename(chapter.name) + DiskUtil.buildValidFilename(chapter.name), ) } } 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 32796dd7d..a8d4f5a4b 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 @@ -211,7 +211,7 @@ class Downloader( downloadChapter(download).subscribeOn(Schedulers.io()) } }, - 5 + 5, ) .onBackpressureLatest() .observeOn(AndroidSchedulers.mainThread()) @@ -223,7 +223,7 @@ class Downloader( DownloadService.stop(context) logcat(LogPriority.ERROR, error) notifier.onError(error.message) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt index a1d31dfbc..218c82554 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt @@ -49,7 +49,7 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet interval.toLong(), TimeUnit.HOURS, 10, - TimeUnit.MINUTES + TimeUnit.MINUTES, ) .addTag(TAG) .setConstraints(constraints) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt index 8b645a438..c26266cc8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt @@ -86,7 +86,7 @@ class LibraryUpdateNotifier(private val context: Context) { Notifications.ID_LIBRARY_PROGRESS, progressNotificationBuilder .setProgress(total, current, false) - .build() + .build(), ) } @@ -110,7 +110,7 @@ class LibraryUpdateNotifier(private val context: Context) { setContentIntent(NotificationReceiver.openErrorLogPendingActivity(context, uri)) } - .build() + .build(), ) } @@ -131,7 +131,7 @@ class LibraryUpdateNotifier(private val context: Context) { setSmallIcon(R.drawable.ic_tachi) addAction(R.drawable.ic_help_24dp, context.getString(R.string.learn_more), NotificationHandler.openUrl(context, HELP_SKIPPED_URL)) } - .build() + .build(), ) } @@ -161,8 +161,8 @@ class LibraryUpdateNotifier(private val context: Context) { NotificationCompat.BigTextStyle().bigText( updates.joinToString("\n") { it.first.title.chop(NOTIF_TITLE_MAX_LEN) - } - ) + }, + ), ) } } @@ -177,7 +177,7 @@ class LibraryUpdateNotifier(private val context: Context) { setContentIntent(getNotificationIntent()) setAutoCancel(true) - } + }, ) // Per-manga notification @@ -222,8 +222,8 @@ class LibraryUpdateNotifier(private val context: Context) { context, manga, chapters, - Notifications.ID_NEW_CHAPTERS - ) + Notifications.ID_NEW_CHAPTERS, + ), ) // View chapters action addAction( @@ -232,8 +232,8 @@ class LibraryUpdateNotifier(private val context: Context) { NotificationReceiver.openChapterPendingActivity( context, manga, - Notifications.ID_NEW_CHAPTERS - ) + Notifications.ID_NEW_CHAPTERS, + ), ) // Download chapters action // Only add the action when chapters is within threshold @@ -245,8 +245,8 @@ class LibraryUpdateNotifier(private val context: Context) { context, manga, chapters, - Notifications.ID_NEW_CHAPTERS - ) + Notifications.ID_NEW_CHAPTERS, + ), ) } } @@ -273,7 +273,7 @@ class LibraryUpdateNotifier(private val context: Context) { val formatter = DecimalFormat( "#.###", DecimalFormatSymbols() - .apply { decimalSeparator = '.' } + .apply { decimalSeparator = '.' }, ) val displayableChapterNumbers = chapters 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 6ed5ffb86..22b4d7b13 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 @@ -310,7 +310,7 @@ class LibraryUpdateService( withUpdateNotification( currentlyUpdatingManga, progressCount, - manga + manga, ) { manga -> try { when { @@ -336,7 +336,7 @@ class LibraryUpdateService( // Convert to the manga that contains new chapters newUpdates.add( manga to newChapters.sortedByDescending { ch -> ch.source_order } - .toTypedArray() + .toTypedArray(), ) } } @@ -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 { @@ -536,7 +536,7 @@ class LibraryUpdateService( notifier.showProgressNotification( updatingManga, completed.get(), - mangaToUpdate.size + mangaToUpdate.size, ) block(manga) @@ -550,7 +550,7 @@ class LibraryUpdateService( notifier.showProgressNotification( updatingManga, completed.get(), - mangaToUpdate.size + mangaToUpdate.size, ) } 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 9d01905f3..26fc7dea7 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 @@ -59,14 +59,14 @@ class NotificationReceiver : BroadcastReceiver() { shareImage( context, intent.getStringExtra(EXTRA_FILE_LOCATION)!!, - intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1) + intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1), ) // Delete image from path and dismiss notification ACTION_DELETE_IMAGE -> deleteImage( context, intent.getStringExtra(EXTRA_FILE_LOCATION)!!, - intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1) + intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1), ) // Share backup file ACTION_SHARE_BACKUP -> @@ -74,11 +74,11 @@ class NotificationReceiver : BroadcastReceiver() { context, intent.getParcelableExtra(EXTRA_URI)!!, "application/x-protobuf+gzip", - intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1) + intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1), ) ACTION_CANCEL_RESTORE -> cancelRestore( context, - intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1) + intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1), ) // Cancel library update and dismiss notification ACTION_CANCEL_LIBRARY_UPDATE -> cancelLibraryUpdate(context, Notifications.ID_LIBRARY_PROGRESS) @@ -87,7 +87,7 @@ class NotificationReceiver : BroadcastReceiver() { openChapter( context, intent.getLongExtra(EXTRA_MANGA_ID, -1), - intent.getLongExtra(EXTRA_CHAPTER_ID, -1) + intent.getLongExtra(EXTRA_CHAPTER_ID, -1), ) } // Mark updated manga chapters as read @@ -120,7 +120,7 @@ class NotificationReceiver : BroadcastReceiver() { context, intent.getParcelableExtra(EXTRA_URI)!!, "text/plain", - intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1) + intent.getIntExtra(EXTRA_NOTIFICATION_ID, -1), ) } } 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 ddd8da2ce..42e9c6d46 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,8 +115,8 @@ object Notifications { }, buildNotificationChannelGroup(GROUP_APK_UPDATES) { setName(context.getString(R.string.label_recent_updates)) - } - ) + }, + ), ) notificationService.createNotificationChannelsCompat( @@ -181,8 +181,8 @@ 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/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index f723c3e42..138a4c527 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -34,13 +34,13 @@ class PreferencesHelper(val context: Context) { private val defaultDownloadsDir = File( Environment.getExternalStorageDirectory().absolutePath + File.separator + context.getString(R.string.app_name), - "downloads" + "downloads", ).toUri() private val defaultBackupDir = File( Environment.getExternalStorageDirectory().absolutePath + File.separator + context.getString(R.string.app_name), - "backup" + "backup", ).toUri() fun startScreen() = prefs.getInt(Keys.startScreen, 1) @@ -67,12 +67,12 @@ class PreferencesHelper(val context: Context) { fun themeMode() = flowPrefs.getEnum( "pref_theme_mode_key", - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { Values.ThemeMode.system } else { Values.ThemeMode.light } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { Values.ThemeMode.system } else { Values.ThemeMode.light }, ) fun appTheme() = flowPrefs.getEnum( "pref_app_theme", - if (DeviceUtil.isDynamicColorAvailable) { Values.AppTheme.MONET } else { Values.AppTheme.DEFAULT } + if (DeviceUtil.isDynamicColorAvailable) { Values.AppTheme.MONET } else { Values.AppTheme.DEFAULT }, ) fun themeDarkAmoled() = flowPrefs.getBoolean("pref_theme_dark_amoled_key", false) @@ -137,8 +137,6 @@ class PreferencesHelper(val context: Context) { fun webtoonSidePadding() = flowPrefs.getInt("webtoon_side_padding", 0) - fun readWithTapping() = flowPrefs.getBoolean("reader_tap", true) - fun pagerNavInverted() = flowPrefs.getEnum("reader_tapping_inverted", Values.TappingInvertMode.NONE) fun webtoonNavInverted() = flowPrefs.getEnum("reader_tapping_inverted_webtoon", Values.TappingInvertMode.NONE) @@ -318,7 +316,7 @@ class PreferencesHelper(val context: Context) { fun extensionInstaller() = flowPrefs.getEnum( "extension_installer", - if (DeviceUtil.isMiui) Values.ExtensionInstaller.LEGACY else Values.ExtensionInstaller.PACKAGEINSTALLER + if (DeviceUtil.isMiui) Values.ExtensionInstaller.LEGACY else Values.ExtensionInstaller.PACKAGEINSTALLER, ) fun verboseLogging() = prefs.getBoolean(Keys.verboseLogging, false) 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 3324efcd4..5314ccd62 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 @@ -47,13 +47,13 @@ class ImageSaver( put( MediaStore.Images.Media.RELATIVE_PATH, "${Environment.DIRECTORY_PICTURES}/${context.getString(R.string.app_name)}/" + - (image.location as Location.Pictures).relativePath + (image.location as Location.Pictures).relativePath, ) } val picture = context.contentResolver.insert( pictureDir, - contentValues + contentValues, ) ?: throw IOException("Couldn't create file") data().use { input -> @@ -133,12 +133,12 @@ sealed class Location { is Pictures -> { val file = File( Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), - context.getString(R.string.app_name) + context.getString(R.string.app_name), ) if (relativePath.isNotEmpty()) { return File( file, - relativePath + relativePath, ) } file 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 b8af832c2..035ddc1ff 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 @@ -56,8 +56,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { authClient.newCall( POST( apiUrl, - body = payload.toString().toRequestBody(jsonMime) - ) + body = payload.toString().toRequestBody(jsonMime), + ), ) .await() .parseAs() @@ -140,8 +140,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { authClient.newCall( POST( apiUrl, - body = payload.toString().toRequestBody(jsonMime) - ) + body = payload.toString().toRequestBody(jsonMime), + ), ) .await() .parseAs() @@ -208,8 +208,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { authClient.newCall( POST( apiUrl, - body = payload.toString().toRequestBody(jsonMime) - ) + body = payload.toString().toRequestBody(jsonMime), + ), ) .await() .parseAs() @@ -250,8 +250,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { authClient.newCall( POST( apiUrl, - body = payload.toString().toRequestBody(jsonMime) - ) + body = payload.toString().toRequestBody(jsonMime), + ), ) .await() .parseAs() @@ -260,7 +260,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { val viewer = data["Viewer"]!!.jsonObject Pair( viewer["id"]!!.jsonPrimitive.int, - viewer["mediaListOptions"]!!.jsonObject["scoreFormat"]!!.jsonPrimitive.content + viewer["mediaListOptions"]!!.jsonObject["scoreFormat"]!!.jsonPrimitive.content, ) } } @@ -275,7 +275,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { struct["format"]!!.jsonPrimitive.content.replace("_", "-"), struct["status"]!!.jsonPrimitive.contentOrNull ?: "", parseDate(struct, "startDate"), - struct["chapters"]!!.jsonPrimitive.intOrNull ?: 0 + struct["chapters"]!!.jsonPrimitive.intOrNull ?: 0, ) } @@ -287,7 +287,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { struct["progress"]!!.jsonPrimitive.int, parseDate(struct, "startedAt"), parseDate(struct, "completedAt"), - jsonToALManga(struct["media"]!!.jsonObject) + jsonToALManga(struct["media"]!!.jsonObject), ) } @@ -297,7 +297,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) { date.set( struct[dateKey]!!.jsonObject["year"]!!.jsonPrimitive.int, struct[dateKey]!!.jsonObject["month"]!!.jsonPrimitive.int - 1, - struct[dateKey]!!.jsonObject["day"]!!.jsonPrimitive.int + struct[dateKey]!!.jsonObject["day"]!!.jsonPrimitive.int, ) date.timeInMillis } catch (_: Exception) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt index b2a9abfd0..dc299b3eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiApi.kt @@ -61,8 +61,8 @@ class BangumiApi(private val client: OkHttpClient, interceptor: BangumiIntercept authClient.newCall( POST( "$apiUrl/subject/${track.media_id}/update/watched_eps", - body = body - ) + body = body, + ), ).await() track @@ -168,7 +168,7 @@ class BangumiApi(private val client: OkHttpClient, interceptor: BangumiIntercept .add("client_secret", clientSecret) .add("code", code) .add("redirect_uri", redirectUrl) - .build() + .build(), ) companion object { @@ -201,7 +201,7 @@ class BangumiApi(private val client: OkHttpClient, interceptor: BangumiIntercept .add("client_secret", clientSecret) .add("refresh_token", token) .add("redirect_uri", redirectUrl) - .build() + .build(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiInterceptor.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiInterceptor.kt index 899ca8782..391b5e9e1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiInterceptor.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/BangumiInterceptor.kt @@ -34,7 +34,7 @@ class BangumiInterceptor(val bangumi: Bangumi) : Interceptor { .header("User-Agent", "Tachiyomi") .url( originalRequest.url.newBuilder() - .addQueryParameter("access_token", currAuth.access_token).build() + .addQueryParameter("access_token", currAuth.access_token).build(), ) .build() else originalRequest.newBuilder() .post(addToken(currAuth.access_token, originalRequest.body as FormBody)) @@ -51,7 +51,7 @@ class BangumiInterceptor(val bangumi: Bangumi) : Interceptor { System.currentTimeMillis() / 1000, oauth.expires_in, oauth.refresh_token, - this.oauth?.user_id + this.oauth?.user_id, ) bangumi.saveToken(oauth) 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 86cfc89b1..e0c968f08 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 48c9f33f5..1387d9d01 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 @@ -62,10 +62,10 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) "${baseUrl}library-entries", headers = headersOf( "Content-Type", - "application/vnd.api+json" + "application/vnd.api+json", ), - body = data.toString().toRequestBody("application/vnd.api+json".toMediaType()) - ) + body = data.toString().toRequestBody("application/vnd.api+json".toMediaType()), + ), ) .await() .parseAs() @@ -98,11 +98,11 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) .headers( headersOf( "Content-Type", - "application/vnd.api+json" - ) + "application/vnd.api+json", + ), ) .patch(data.toString().toRequestBody("application/vnd.api+json".toMediaType())) - .build() + .build(), ) .await() .parseAs() @@ -137,10 +137,10 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) "X-Algolia-Application-Id", algoliaAppId, "X-Algolia-API-Key", - key + key, ), - body = jsonObject.toString().toRequestBody(jsonMime) - ) + body = jsonObject.toString().toRequestBody(jsonMime), + ), ) .await() .parseAs() @@ -252,7 +252,7 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) .add("refresh_token", token) .add("client_id", clientId) .add("client_secret", clientSecret) - .build() + .build(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt index 5f65ab4b8..5292dac21 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/KomgaApi.kt @@ -72,7 +72,7 @@ class KomgaApi(private val client: OkHttpClient) { Request.Builder() .url("${track.tracking_url.replace("/api/v1/series/", "/api/v2/series/")}/read-progress/tachiyomi") .put(payload.toRequestBody("application/json".toMediaType())) - .build() + .build(), ) .await() return getTrackSearch(track.tracking_url) 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 a5732ba07..3b8a4ce4a 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 @@ -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/MyAnimeListApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt index fe526274d..5eef11d57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt @@ -165,7 +165,7 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI .filter { it.jsonObject["node"]!!.jsonObject["title"]!!.jsonPrimitive.content.contains( query, - ignoreCase = true + ignoreCase = true, ) } .map { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt index efde7c7eb..1aeb598eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/ShikimoriApi.kt @@ -44,8 +44,8 @@ class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInter authClient.newCall( POST( "$apiUrl/v2/user_rates", - body = payload.toString().toRequestBody(jsonMime) - ) + body = payload.toString().toRequestBody(jsonMime), + ), ).await() track } @@ -153,7 +153,7 @@ class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInter .add("client_secret", clientSecret) .add("code", code) .add("redirect_uri", redirectUrl) - .build() + .build(), ) companion object { @@ -186,7 +186,7 @@ class ShikimoriApi(private val client: OkHttpClient, interceptor: ShikimoriInter .add("client_id", clientId) .add("client_secret", clientSecret) .add("refresh_token", token) - .build() + .build(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt index 20a433a01..9786fa0d2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt @@ -45,7 +45,7 @@ class AppUpdateJob(private val context: Context, workerParams: WorkerParameters) 7, TimeUnit.DAYS, 3, - TimeUnit.HOURS + TimeUnit.HOURS, ) .addTag(TAG) .setConstraints(constraints) 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 786a38fd3..f6bcce4b7 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() @@ -105,12 +105,12 @@ internal class AppUpdateNotifier(private val context: Context) { addAction( R.drawable.ic_system_update_alt_white_24dp, context.getString(R.string.action_install), - installIntent + installIntent, ) addAction( R.drawable.ic_close_24dp, context.getString(R.string.action_cancel), - NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_APP_UPDATER) + NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_APP_UPDATER), ) } notificationBuilder.show() @@ -132,12 +132,12 @@ internal class AppUpdateNotifier(private val context: Context) { addAction( R.drawable.ic_refresh_24dp, context.getString(R.string.action_retry), - AppUpdateService.downloadApkPendingService(context, url) + AppUpdateService.downloadApkPendingService(context, url), ) addAction( R.drawable.ic_close_24dp, context.getString(R.string.action_cancel), - NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_APP_UPDATER) + NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_APP_UPDATER), ) } notificationBuilder.show(Notifications.ID_APP_UPDATER) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt index 1c4deb199..0f70dba75 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt @@ -50,8 +50,8 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam context.resources.getQuantityString( R.plurals.update_check_notification_ext_updates, names.size, - names.size - ) + names.size, + ), ) val extNames = names.joinToString(", ") setContentText(extNames) @@ -59,7 +59,7 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam setSmallIcon(R.drawable.ic_extension_24dp) setContentIntent(NotificationReceiver.openExtensionsPendingActivity(context)) setAutoCancel(true) - } + }, ) } } @@ -79,7 +79,7 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam 2, TimeUnit.DAYS, 3, - TimeUnit.HOURS + TimeUnit.HOURS, ) .addTag(TAG) .setConstraints(constraints) 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 06af026c1..19798d29e 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 @@ -85,7 +85,7 @@ internal class ExtensionGithubApi { hasChangelog = it.hasChangelog == 1, sources = it.sources?.toExtensionSources() ?: emptyList(), apkName = it.apk, - iconUrl = "${REPO_URL_PREFIX}icon/${it.apk.replace(".apk", ".png")}" + iconUrl = "${REPO_URL_PREFIX}icon/${it.apk.replace(".apk", ".png")}", ) } } @@ -95,7 +95,7 @@ internal class ExtensionGithubApi { AvailableExtensionSources( name = it.name, id = it.id, - baseUrl = it.baseUrl + baseUrl = it.baseUrl, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt index 85db552cc..ecaedf10c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/installer/PackageInstallerInstaller.kt @@ -70,7 +70,7 @@ class PackageInstallerInstaller(private val service: Service) : Installer(servic service, activeSession!!.second, Intent(INSTALL_ACTION), - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0, ).intentSender session.commit(intentSender) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt index 14fa14504..9f387b500 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstaller.kt @@ -249,7 +249,7 @@ internal class ExtensionInstaller(private val context: Context) { downloadManager.query(query).use { cursor -> if (cursor.moveToFirst()) { val localUri = cursor.getString( - cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LOCAL_URI) + cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LOCAL_URI), ).removePrefix(FILE_SCHEME) installApk(id, File(localUri).getUriCompat(context)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt index 77c63760c..240cb1f65 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt @@ -120,7 +120,7 @@ internal object ExtensionLoader { if (libVersion < LIB_VERSION_MIN || libVersion > LIB_VERSION_MAX) { val exception = Exception( "Lib version is $libVersion, while only versions " + - "$LIB_VERSION_MIN to $LIB_VERSION_MAX are allowed" + "$LIB_VERSION_MIN to $LIB_VERSION_MAX are allowed", ) logcat(LogPriority.WARN, exception) return LoadResult.Error(exception) @@ -190,7 +190,7 @@ internal object ExtensionLoader { sources = sources, pkgFactory = appInfo.metaData.getString(METADATA_SOURCE_FACTORY), isUnofficial = signatureHash != officialSignature, - icon = context.getApplicationIcon(pkgName) + icon = context.getApplicationIcon(pkgName), ) return LoadResult.Success(extension) } 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 6028bae53..9a783495c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/DohProviders.kt @@ -26,9 +26,9 @@ 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() + .build(), ) fun OkHttpClient.Builder.dohGoogle() = dns( @@ -38,9 +38,9 @@ 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() + .build(), ) // AdGuard "Default" DNS works too but for the sake of making sure no site is blacklisted, @@ -52,9 +52,9 @@ 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() + .build(), ) fun OkHttpClient.Builder.dohQuad9() = dns( @@ -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() + .build(), ) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt index 22e99769a..0d7e45e3b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt @@ -79,7 +79,7 @@ suspend fun Call.await(): Response { if (continuation.isCancelled) return continuation.resumeWithException(e) } - } + }, ) continuation.invokeOnCancellation { 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 27b2fe73b..128f3d2b3 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 @@ -314,7 +314,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour private class OrderBy(context: Context) : Filter.Sort( context.getString(R.string.local_filter_order_by), arrayOf(context.getString(R.string.title), context.getString(R.string.date)), - Selection(0, true) + Selection(0, true), ) sealed class Format { @@ -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/Source.kt b/app/src/main/java/eu/kanade/tachiyomi/source/Source.kt index 70de5a4a7..c08a610dd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/Source.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/Source.kt @@ -42,7 +42,7 @@ interface Source : tachiyomi.source.Source { */ @Deprecated( "Use the 1.x API instead", - ReplaceWith("getMangaDetails") + ReplaceWith("getMangaDetails"), ) fun fetchMangaDetails(manga: SManga): Observable = throw IllegalStateException("Not used") @@ -53,7 +53,7 @@ interface Source : tachiyomi.source.Source { */ @Deprecated( "Use the 1.x API instead", - ReplaceWith("getChapterList") + ReplaceWith("getChapterList"), ) fun fetchChapterList(manga: SManga): Observable> = throw IllegalStateException("Not used") @@ -65,7 +65,7 @@ interface Source : tachiyomi.source.Source { */ @Deprecated( "Use the 1.x API instead", - ReplaceWith("getPageList") + ReplaceWith("getPageList"), ) fun fetchPageList(chapter: SChapter): Observable> = Observable.empty() diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt b/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt index 29afe3904..5172dca91 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt @@ -45,7 +45,7 @@ open class SourceManager(private val context: Context) { } private fun createInternalSources(): List = listOf( - LocalSource(context) + LocalSource(context), ) inner class StubSource(override val id: Long) : Source { 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 8bf5d7632..c6b46dde2 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 @@ -68,13 +68,13 @@ open class Page( fun Page.toPageUrl(): PageUrl { return PageUrl( - url = this.imageUrl ?: this.url + url = this.imageUrl ?: this.url, ) } fun PageUrl.toPage(index: Int): Page { return Page( index = index, - imageUrl = this.url + imageUrl = this.url, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt index e9d10fb89..f7e8a14ad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt @@ -36,7 +36,7 @@ fun SChapter.toChapterInfo(): ChapterInfo { key = this.url, name = this.name, number = this.chapter_number, - scanlator = this.scanlator ?: "" + scanlator = this.scanlator ?: "", ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt index b32f57ee1..489938aba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt @@ -75,7 +75,7 @@ fun SManga.toMangaInfo(): MangaInfo { description = this.description ?: "", genres = this.genre?.split(", ") ?: emptyList(), status = this.status, - cover = this.thumbnail_url ?: "" + cover = this.thumbnail_url ?: "", ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt index 34383b16e..18bf71abf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt @@ -46,7 +46,7 @@ abstract class BaseController(bundle: Bundle? = null) : Contro viewScope.cancel() logcat { "Destroy view for ${controller.instance()}" } } - } + }, ) } @@ -107,7 +107,7 @@ abstract class BaseController(bundle: Bundle? = null) : Contro return onCollapse?.invoke(item) ?: true } - } + }, ) if (expandActionViewFromInteraction) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt index 9fe0cffd2..847f97214 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt @@ -90,7 +90,7 @@ abstract class DialogController : Controller { RouterTransaction.with(this) .pushChangeHandler(SimpleSwapChangeHandler(false)) .popChangeHandler(SimpleSwapChangeHandler(false)) - .tag(tag) + .tag(tag), ) } 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 1318c75f5..a0ea5a834 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 @@ -17,7 +17,7 @@ class OneWayFadeChangeHandler : FadeChangeHandler { constructor(duration: Long) : super(duration) constructor(duration: Long, removesFromViewOnPush: Boolean) : super( duration, - removesFromViewOnPush + removesFromViewOnPush, ) override fun getAnimator( 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 cc8482322..583437a9e 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 @@ -57,7 +57,7 @@ abstract class SearchableNucleusController expandActionViewFromInteraction = true R.id.action_settings -> { parentController!!.router.pushController( - ExtensionFilterController().withFadeTransaction() + ExtensionFilterController().withFadeTransaction(), ) } } @@ -215,7 +215,7 @@ open class ExtensionController : is Extension.Untrusted -> it.extension.name.contains(query, ignoreCase = true) } } - } + }, ) } else { adapter?.updateDataSet(extensions) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt index 019ae65ff..28041c556 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt @@ -73,7 +73,7 @@ class ExtensionHolder(view: View, val adapter: ExtensionAdapter) : is Extension.Available -> R.string.ext_install } } - } + }, ) val isIdle = installStep == InstallStep.Idle || installStep == InstallStep.Error 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 729edc4ee..c4fd1f4bb 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 @@ -69,7 +69,7 @@ open class ExtensionPresenter( val installedSorted = installed.filter { !it.hasUpdate && (showNsfwSources || !it.isNsfw) } .sortedWith( compareBy { !it.isObsolete } - .thenBy(String.CASE_INSENSITIVE_ORDER) { it.name } + .thenBy(String.CASE_INSENSITIVE_ORDER) { it.name }, ) val untrustedSorted = untrusted.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name }) @@ -163,7 +163,7 @@ open class ExtensionPresenter( if (item != null) { view.downloadUpdate(item) } - }) + },) } fun uninstallExtension(pkgName: String) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionTrustDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionTrustDialog.kt index c1de2551d..23d23a32b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionTrustDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionTrustDialog.kt @@ -14,8 +14,8 @@ class ExtensionTrustDialog(bundle: Bundle? = null) : DialogController(bundle) constructor(target: T, signatureHash: String, pkgName: String) : this( bundleOf( SIGNATURE_KEY to signatureHash, - PKGNAME_KEY to pkgName - ) + PKGNAME_KEY to pkgName, + ), ) { targetController = target } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsController.kt index b2dcd2f2e..02747b2ea 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsController.kt @@ -55,7 +55,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) : private var preferenceScreen: PreferenceScreen? = null constructor(pkgName: String) : this( - bundleOf(PKGNAME_KEY to pkgName) + bundleOf(PKGNAME_KEY to pkgName), ) init { @@ -91,7 +91,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) : binding.extensionPrefsRecycler.layoutManager = LinearLayoutManager(context) binding.extensionPrefsRecycler.adapter = ConcatAdapter( ExtensionDetailsHeaderAdapter(presenter), - initPreferencesAdapter(context, extension) + initPreferencesAdapter(context, extension), ) } @@ -166,7 +166,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) : block() onSettingsClick = View.OnClickListener { router.pushController( - SourcePreferencesController(source.id).withFadeTransaction() + SourcePreferencesController(source.id).withFadeTransaction(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsPresenter.kt index 9a18a597f..bfe30a46a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/ExtensionDetailsPresenter.kt @@ -33,7 +33,7 @@ class ExtensionDetailsPresenter( .observeOn(AndroidSchedulers.mainThread()) .subscribeFirst({ view, _ -> view.onExtensionUninstalled() - }) + },) } fun uninstallExtension() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesController.kt index 3b726b23d..fc2dec264 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/details/SourcePreferencesController.kt @@ -43,7 +43,7 @@ class SourcePreferencesController(bundle: Bundle? = null) : private var preferenceScreen: PreferenceScreen? = null constructor(sourceId: Long) : this( - bundleOf(SOURCE_ID to sourceId) + bundleOf(SOURCE_ID to sourceId), ) override fun createBinding(inflater: LayoutInflater): SourcePreferencesControllerBinding { @@ -69,7 +69,7 @@ class SourcePreferencesController(bundle: Bundle? = null) : val themedContext by lazy { getPreferenceThemeContext() } val manager = PreferenceManager(themedContext) val dataStore = SharedPreferencesDataStore( - context.getSharedPreferences(source.getPreferenceKey(), Context.MODE_PRIVATE) + context.getSharedPreferences(source.getPreferenceKey(), Context.MODE_PRIVATE), ) manager.preferenceDataStore = dataStore manager.onDisplayPreferenceDialogListener = this @@ -158,7 +158,7 @@ class SourcePreferencesController(bundle: Bundle? = null) : .newInstance(preference.getKey()) else -> throw IllegalArgumentException( "Tried to display dialog for unknown " + - "preference type. Did you forget to override onDisplayPreferenceDialog()?" + "preference type. Did you forget to override onDisplayPreferenceDialog()?", ) } f.targetController = this diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt index 20b4445b8..676205724 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/manga/MigrationMangaController.kt @@ -23,14 +23,14 @@ class MigrationMangaController : constructor(sourceId: Long, sourceName: String?) : super( bundleOf( SOURCE_ID_EXTRA to sourceId, - SOURCE_NAME_EXTRA to sourceName - ) + SOURCE_NAME_EXTRA to sourceName, + ), ) @Suppress("unused") constructor(bundle: Bundle) : this( bundle.getLong(SOURCE_ID_EXTRA), - bundle.getString(SOURCE_NAME_EXTRA) + bundle.getString(SOURCE_NAME_EXTRA), ) private val sourceId: Long = args.getLong(SOURCE_ID_EXTRA) 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 ec2e998f0..0c103d7fe 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 @@ -27,7 +27,7 @@ class SearchController( override fun createPresenter(): GlobalSearchPresenter { return SearchPresenter( initialQuery, - manga!! + manga!!, ) } 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 73b42a3f5..5c671b575 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 @@ -40,7 +40,7 @@ class SearchPresenter( replacingMangaRelay.subscribeLatestCache( { controller, (isReplacingManga, newManga) -> (controller as? SearchController)?.renderIsReplacingManga(isReplacingManga, newManga) - } + }, ) } @@ -93,15 +93,15 @@ class SearchPresenter( val flags = preferences.migrateFlags().get() val migrateChapters = MigrationFlags.hasChapters( - flags + flags, ) val migrateCategories = MigrationFlags.hasCategories( - flags + flags, ) val migrateTracks = MigrationFlags.hasTracks( - flags + flags, ) db.inTransaction { 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 dba7e0209..23275e561 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 @@ -18,7 +18,7 @@ class SourceSearchController( if (searchQuery != null) { putString(SEARCH_QUERY_KEY, searchQuery) } - } + }, ) private var oldManga: Manga? = args.getSerializable(MANGA_KEY) as Manga? private var newManga: Manga? = null 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 b6e187889..43abb3448 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 @@ -27,7 +27,7 @@ class SelectionHeader : AbstractHeaderItem() { override fun createViewHolder(view: View, adapter: FlexibleAdapter>): Holder { return Holder( view, - adapter + adapter, ) } 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 90fd1ebb5..b2bde56c7 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 @@ -30,7 +30,7 @@ data class SourceItem(val source: Source, val mangaCount: Int, val header: Selec override fun createViewHolder(view: View, adapter: FlexibleAdapter>): SourceHolder { return SourceHolder( view, - adapter as SourceAdapter + adapter as SourceAdapter, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt index d198e080d..0b1590d39 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceController.kt @@ -124,7 +124,7 @@ class SourceController : val isPinned = item.header?.code?.equals(SourcePresenter.PINNED_KEY) ?: false val items = mutableListOf( - activity.getString(if (isPinned) R.string.action_unpin else R.string.action_pin) to { toggleSourcePin(item.source) } + activity.getString(if (isPinned) R.string.action_unpin else R.string.action_pin) to { toggleSourcePin(item.source) }, ) if (item.source !is LocalSource) { items.add(activity.getString(R.string.action_disable) to { disableSource(item.source) }) @@ -195,7 +195,7 @@ class SourceController : R.id.action_settings -> { parentController!!.router.pushController( SourceFilterController() - .withFadeTransaction() + .withFadeTransaction(), ) } } @@ -248,13 +248,13 @@ class SourceController : R.menu.browse_sources, R.id.action_search, R.string.action_global_search_hint, - false // GlobalSearch handles the searching here + false, // GlobalSearch handles the searching here ) } override fun onSearchViewQueryTextSubmit(query: String?) { parentController!!.router.pushController( - GlobalSearchController(query).withFadeTransaction() + GlobalSearchController(query).withFadeTransaction(), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt index 0df9dc0ec..bb1aaa7d9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceFilterController.kt @@ -37,8 +37,8 @@ class SourceFilterController : SettingsController() { val orderedLangs = sourcesByLang.keys.sortedWith( compareBy( { it !in activeLangsCodes }, - { LocaleHelper.getSourceDisplayName(it, context) } - ) + { LocaleHelper.getSourceDisplayName(it, context) }, + ), ) orderedLangs.forEach { lang -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index b91126a17..5aa9d84fe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -76,7 +76,7 @@ open class BrowseSourceController(bundle: Bundle) : if (searchQuery != null) { putString(SEARCH_QUERY_KEY, searchQuery) } - } + }, ) private val preferences: PreferencesHelper by injectLazy() @@ -155,7 +155,7 @@ open class BrowseSourceController(bundle: Bundle) : val newFilters = presenter.source.getFilterList() presenter.sourceFilters = newFilters filterSheet?.setFilters(presenter.filterItems) - } + }, ) filterSheet?.setFilters(presenter.filterItems) @@ -269,7 +269,7 @@ open class BrowseSourceController(bundle: Bundle) : } true - } + }, ) val displayItem = when (preferences.sourceDisplayMode().get()) { @@ -426,13 +426,13 @@ open class BrowseSourceController(bundle: Bundle) : if (adapter.isEmpty) { val actions = if (presenter.source is LocalSource) { listOf( - EmptyView.Action(R.string.local_source_help_guide, R.drawable.ic_help_24dp) { openLocalSourceHelpGuide() } + EmptyView.Action(R.string.local_source_help_guide, R.drawable.ic_help_24dp) { openLocalSourceHelpGuide() }, ) } else { listOf( EmptyView.Action(R.string.action_retry, R.drawable.ic_refresh_24dp, retryAction), EmptyView.Action(R.string.action_open_in_web_view, R.drawable.ic_public_24dp) { openInWebView() }, - EmptyView.Action(R.string.label_help, R.drawable.ic_help_24dp) { activity?.openInBrowser(MoreController.URL_HELP) } + EmptyView.Action(R.string.label_help, R.drawable.ic_help_24dp) { activity?.openInBrowser(MoreController.URL_HELP) }, ) } 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 483999725..1bae71a31 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 @@ -157,7 +157,7 @@ open class BrowseSourcePresenter( }, { _, error -> logcat(LogPriority.ERROR, error) - } + }, ) // Request first page. 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 aae8ccbfe..bcda39e8d 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 @@ -49,7 +49,7 @@ class SourceFilterSheet( private val binding = SourceFilterSheetBinding.inflate( LayoutInflater.from(context), null, - false + false, ) init { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/GroupItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/GroupItem.kt index 816db01b9..9bd64bc33 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/GroupItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/GroupItem.kt @@ -39,7 +39,7 @@ class GroupItem(val filter: Filter.Group<*>) : AbstractExpandableHeaderItem) : AbstractFlexibleItem( holder.itemView.context, android.R.layout.simple_spinner_item, - filter.values + filter.values, ).apply { setDropDownViewResource(R.layout.common_spinner_item) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/SortGroup.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/SortGroup.kt index c991c083e..f64837004 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/SortGroup.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/filter/SortGroup.kt @@ -36,7 +36,7 @@ class SortGroup(val filter: Filter.Sort) : AbstractExpandableHeaderItem TR.drawable.ic_check_box_24dp Filter.TriState.STATE_EXCLUDE -> TR.drawable.ic_check_box_x_24dp else -> throw Exception("Unknown state") - } + }, )?.apply { val color = if (filter.state == Filter.TriState.STATE_INCLUDE) { view.context.getResourceColor(R.attr.colorAccent) 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 0c0a9ce44..94aeb7751 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 @@ -91,7 +91,7 @@ open class GlobalSearchController( R.menu.global_search, R.id.action_search, null, - false // the onMenuItemActionExpand will handle this + false, // the onMenuItemActionExpand will handle this ) optionsMenuSearchItem = menu.findItem(R.id.action_search) 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 b6d9b6451..ddf43b40b 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 @@ -75,7 +75,7 @@ open class GlobalSearchPresenter( // Perform a search with previous or initial state search( savedState?.getString(BrowseSourcePresenter::query.name) - ?: initialQuery.orEmpty() + ?: initialQuery.orEmpty(), ) } @@ -172,7 +172,7 @@ open class GlobalSearchPresenter( .doOnNext { fetchImage(it, source) } // Load manga covers .map { list -> createCatalogueSearchItem(source, list.map { GlobalSearchCardItem(it) }) } }, - 5 + 5, ) .observeOn(AndroidSchedulers.mainThread()) // Update matching source with the obtained results @@ -185,8 +185,8 @@ open class GlobalSearchPresenter( { it.results.isNullOrEmpty() }, // Same as initial sort, i.e. pinned first then alphabetically { it.source.id.toString() !in pinnedSourceIds }, - { "${it.source.name.lowercase()} (${it.source.lang})" } - ) + { "${it.source.name.lowercase()} (${it.source.lang})" }, + ), ) } // Update current state @@ -199,7 +199,7 @@ open class GlobalSearchPresenter( }, { _, error -> logcat(LogPriority.ERROR, error) - } + }, ) } @@ -234,7 +234,7 @@ open class GlobalSearchPresenter( }, { error -> logcat(LogPriority.ERROR, error) - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/latest/LatestUpdatesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/latest/LatestUpdatesController.kt index 2c696036e..2561eeb57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/latest/LatestUpdatesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/latest/LatestUpdatesController.kt @@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourcePresenter class LatestUpdatesController(bundle: Bundle) : BrowseSourceController(bundle) { constructor(source: CatalogueSource) : this( - bundleOf(SOURCE_ID_KEY to source.id) + bundleOf(SOURCE_ID_KEY to source.id), ) override fun createPresenter(): BrowseSourcePresenter { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt index a4f218369..7781ac365 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt @@ -195,7 +195,7 @@ class CategoryController : (activity as? MainActivity)?.binding?.rootCoordinator!!, R.string.snack_categories_deleted, R.string.action_undo, - 4000 + 4000, ) mode.finish() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadAdapter.kt index 9ba345141..227dc6fe7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadAdapter.kt @@ -12,7 +12,7 @@ import eu.davidea.flexibleadapter.items.AbstractFlexibleItem class DownloadAdapter(controller: DownloadController) : FlexibleAdapter>( null, controller, - true + true, ) { /** 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 5df04fddb..0b6b1d663 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 @@ -312,7 +312,7 @@ class DownloadController : R.string.action_pause } else { R.string.action_resume - } + }, ) setIconResource( @@ -320,7 +320,7 @@ class DownloadController : R.drawable.ic_pause_24dp } else { R.drawable.ic_play_arrow_24dp - } + }, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt index 371869fe6..8f4623143 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt @@ -95,7 +95,7 @@ class DownloadHolder(private val view: View, val adapter: DownloadAdapter) : }, onMenuItemClick = { adapter.downloadItemListener.onMenuItemClick(bindingAdapterPosition, this) - } + }, ) } } 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 cd03f3128..224a7555b 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 @@ -43,7 +43,7 @@ class ChangeMangaCategoriesDialog(bundle: Bundle? = null) : setQuadStateMultiChoiceItems( items = categories.map { it.name }, isActionList = false, - initialSelected = preselected.toIntArray() + initialSelected = preselected.toIntArray(), ) { selections -> selected = selections } 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 0139e8f61..45a6dfbda 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/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 2dc5aed8c..291892bc1 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 @@ -211,7 +211,7 @@ class LibraryController( binding.btnGlobalSearch.clicks() .onEach { router.pushController( - GlobalSearchController(presenter.query).withFadeTransaction() + GlobalSearchController(presenter.query).withFadeTransaction(), ) } .launchIn(viewScope) @@ -281,8 +281,8 @@ class LibraryController( listOf( 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/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 3b268ff64..44ee49e4d 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 @@ -107,7 +107,7 @@ class LibraryPresenter( .observeOn(AndroidSchedulers.mainThread()) .subscribeLatestCache({ view, (categories, mangaMap) -> view.onNextLibraryUpdate(categories, mangaMap) - }) + },) } } @@ -381,7 +381,7 @@ class LibraryPresenter( LibraryItem( libraryManga, shouldSetFromCategory, - defaultLibraryDisplayMode + defaultLibraryDisplayMode, ) }.groupBy { it.manga.category } } 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 ba8925a54..2991a9729 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 @@ -57,13 +57,13 @@ class LibrarySettingsSheet( override fun getTabViews(): List = listOf( filters, sort, - display + display, ) override fun getTabTitles(): List = listOf( R.string.action_filter, R.string.action_sort, - R.string.action_display + R.string.action_display, ) /** 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 0f2ad1d9b..04dc53036 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 @@ -217,7 +217,7 @@ class MainActivity : BaseActivity() { handler: ControllerChangeHandler, ) { } - } + }, ) if (!router.hasRootController()) { // Set start screen @@ -494,7 +494,7 @@ class MainActivity : BaseActivity() { // Color taken from m3_appbar_background window.statusBarColor = ColorUtils.compositeColors( getColor(R.color.m3_appbar_overlay_color), - getThemeColor(R.attr.colorSurface) + getThemeColor(R.attr.colorSurface), ) super.onSupportActionModeStarted(mode) } 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 45d32ebda..9fd144ed0 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 @@ -121,8 +121,8 @@ class MangaController : constructor(manga: Manga?, fromSource: Boolean = false) : super( bundleOf( MANGA_EXTRA to (manga?.id ?: 0), - FROM_SOURCE_EXTRA to fromSource - ) + FROM_SOURCE_EXTRA to fromSource, + ), ) { this.manga = manga if (manga != null) { @@ -131,7 +131,7 @@ class MangaController : } constructor(mangaId: Long) : this( - Injekt.get().getManga(mangaId).executeAsBlocking() + Injekt.get().getManga(mangaId).executeAsBlocking(), ) @Suppress("unused") @@ -222,7 +222,7 @@ class MangaController : override fun createPresenter(): MangaPresenter { return MangaPresenter( manga!!, - source!! + source!!, ) } @@ -268,7 +268,7 @@ class MangaController : val mainActivityAppBar = (activity as? MainActivity)?.binding?.appbar (it.layoutManager as LinearLayoutManager).scrollToPositionWithOffset( 1, - mainActivityAppBar?.height ?: 0 + mainActivityAppBar?.height ?: 0, ) mainActivityAppBar?.isLifted = true } @@ -532,7 +532,7 @@ class MangaController : if (duplicateManga != null) { showAddDuplicateDialog( manga, - duplicateManga + duplicateManga, ) } else { addToLibrary(manga) @@ -661,7 +661,7 @@ class MangaController : super.postDestroy(controller) dialog = null } - } + }, ) dialog?.showDialog(router) } @@ -770,7 +770,7 @@ class MangaController : super.postDestroy(controller) dialog = null } - } + }, ) dialog?.showDialog(router) } @@ -785,8 +785,8 @@ class MangaController : image = Image.Cover( bitmap = coverBitmap, name = manga.title, - location = Location.Cache - ) + location = Location.Cache, + ), ) launchUI { startActivity(uri.toShareIntent(activity)) @@ -809,8 +809,8 @@ class MangaController : image = Image.Cover( bitmap = coverBitmap, name = manga.title, - location = Location.Pictures.create() - ) + location = Location.Pictures.create(), + ), ) launchUI { activity.toast(R.string.cover_saved) @@ -840,9 +840,9 @@ class MangaController : startActivityForResult( Intent.createChooser( intent, - resources?.getString(R.string.file_select_cover) + resources?.getString(R.string.file_select_cover), ), - REQUEST_IMAGE_OPEN + REQUEST_IMAGE_OPEN, ) } else { activity?.toast(R.string.notification_first_add_to_library) @@ -954,13 +954,13 @@ class MangaController : val activityOptions = ActivityOptions.makeSceneTransitionAnimation( activity, sharedElement, - ReaderActivity.SHARED_ELEMENT_NAME + ReaderActivity.SHARED_ELEMENT_NAME, ) startActivity( intent.apply { putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true) }, - activityOptions.toBundle() + activityOptions.toBundle(), ) } else { startActivity(intent) @@ -1259,7 +1259,7 @@ class MangaController : private fun showCustomDownloadDialog() { DownloadCustomChaptersDialog( this, - presenter.allChapters.size + presenter.allChapters.size, ).showDialog(router) } 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 71c096a2e..e65a18311 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 @@ -137,7 +137,7 @@ class MangaPresenter( filteredAndSortedChapters = chapters view?.onNextChapters(chapters) }, - { _, error -> logcat(LogPriority.ERROR, error) } + { _, error -> logcat(LogPriority.ERROR, error) }, ) // Manga info - end @@ -162,7 +162,7 @@ class MangaPresenter( // Listen for download status changes observeDownloads() } - .subscribe { chaptersRelay.call(it) } + .subscribe { chaptersRelay.call(it) }, ) // Chapters list - end @@ -328,7 +328,7 @@ class MangaPresenter( .observeOn(AndroidSchedulers.mainThread()) .subscribeFirst( { view, _ -> view.onSetCoverSuccess() }, - { view, e -> view.onSetCoverError(e) } + { view, e -> view.onSetCoverError(e) }, ) } @@ -343,7 +343,7 @@ class MangaPresenter( .observeOn(AndroidSchedulers.mainThread()) .subscribeFirst( { view, _ -> view.onSetCoverSuccess() }, - { view, e -> view.onSetCoverError(e) } + { view, e -> view.onSetCoverError(e) }, ) } @@ -365,7 +365,7 @@ class MangaPresenter( }, { _, error -> logcat(LogPriority.ERROR, error) - } + }, ) observeDownloadsPageSubscription?.let { remove(it) } 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 2a513563c..def5c2f5b 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 @@ -29,7 +29,7 @@ class ChaptersAdapter( val decimalFormat = DecimalFormat( "#.###", DecimalFormatSymbols() - .apply { decimalSeparator = '.' } + .apply { decimalSeparator = '.' }, ) val relativeTime: Int = preferences.relativeTime().get() 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 35f55d9ce..b63d0db3c 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 @@ -38,13 +38,13 @@ class ChaptersSettingsSheet( override fun getTabViews(): List = listOf( filters, sort, - display + display, ) override fun getTabTitles(): List = listOf( R.string.action_filter, R.string.action_sort, - R.string.action_display + R.string.action_display, ) private fun showPopupMenu(view: View) { @@ -56,7 +56,7 @@ class ChaptersSettingsSheet( SetChapterSettingsDialog(presenter.manga).showDialog(router) } } - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/DownloadCustomChaptersDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/DownloadCustomChaptersDialog.kt index 782a863fc..a1af94cc3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/DownloadCustomChaptersDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/DownloadCustomChaptersDialog.kt @@ -26,7 +26,7 @@ class DownloadCustomChaptersDialog : DialogController */ constructor(target: T, maxChapters: Int) : super( // Add maximum number of chapters to download value to bundle. - bundleOf(KEY_ITEM_MAX to maxChapters) + bundleOf(KEY_ITEM_MAX to maxChapters), ) { targetController = target this.maxChapters = maxChapters diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt index 9b3d4efd7..a94c0fc89 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/SetChapterSettingsDialog.kt @@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.widget.DialogCheckboxView class SetChapterSettingsDialog(bundle: Bundle? = null) : DialogController(bundle) { constructor(manga: Manga) : this( - bundleOf(MANGA_KEY to manga) + bundleOf(MANGA_KEY to manga), ) override fun onCreateDialog(savedViewState: Bundle?): Dialog { 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 c2e9f68a1..a3a38dd43 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 @@ -36,7 +36,7 @@ open class BaseChapterHolder( } else { adapter.clickListener.deleteChapter(position) } - } + }, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaFullCoverDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaFullCoverDialog.kt index ac5405bb9..3ffe68d13 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaFullCoverDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaFullCoverDialog.kt @@ -107,8 +107,8 @@ class MangaFullCoverDialog : DialogController { binding?.container?.setImage( it, ReaderPageImageView.Config( - zoomDuration = 500 - ) + zoomDuration = 500, + ), ) } .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt index b26100116..35ac3adc8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt @@ -115,7 +115,7 @@ class MangaInfoHeaderAdapter( text = view.context.resources.getQuantityString( R.plurals.num_trackers, trackCount, - trackCount + trackCount, ) isActivated = true } else { @@ -143,7 +143,7 @@ class MangaInfoHeaderAdapter( .onEach { controller.activity?.copyToClipboard( view.context.getString(R.string.title), - binding.mangaFullTitle.text.toString() + binding.mangaFullTitle.text.toString(), ) } .launchIn(controller.viewScope) @@ -158,7 +158,7 @@ class MangaInfoHeaderAdapter( .onEach { controller.activity?.copyToClipboard( binding.mangaAuthor.text.toString(), - binding.mangaAuthor.text.toString() + binding.mangaAuthor.text.toString(), ) } .launchIn(controller.viewScope) @@ -173,7 +173,7 @@ class MangaInfoHeaderAdapter( .onEach { controller.activity?.copyToClipboard( binding.mangaArtist.text.toString(), - binding.mangaArtist.text.toString() + binding.mangaArtist.text.toString(), ) } .launchIn(controller.viewScope) @@ -204,7 +204,7 @@ class MangaInfoHeaderAdapter( R.string.action_share, R.string.action_save, // Can only edit cover for library manga - if (manga.favorite) R.string.action_edit else null + if (manga.favorite) R.string.action_edit else null, ).map(controller.activity!!::getString).toTypedArray() MaterialAlertDialogBuilder(controller.activity!!) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt index 9ae0b03c3..bfd7e4837 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt @@ -22,7 +22,7 @@ class SetTrackChaptersDialog : DialogController private lateinit var listener: Listener constructor(target: T, listener: Listener, item: TrackItem) : super( - bundleOf(KEY_ITEM_TRACK to item.track) + bundleOf(KEY_ITEM_TRACK to item.track), ) { targetController = target this.listener = listener diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt index fd0d407d7..d7732933b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt @@ -22,7 +22,7 @@ class SetTrackScoreDialog : DialogController private lateinit var listener: Listener constructor(target: T, listener: Listener, item: TrackItem) : super( - bundleOf(KEY_ITEM_TRACK to item.track) + bundleOf(KEY_ITEM_TRACK to item.track), ) { targetController = target this.listener = listener diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt index 0a760d1ea..961efe6eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackStatusDialog.kt @@ -20,7 +20,7 @@ class SetTrackStatusDialog : DialogController private lateinit var listener: Listener constructor(target: T, listener: Listener, item: TrackItem) : super( - bundleOf(KEY_ITEM_TRACK to item.track) + bundleOf(KEY_ITEM_TRACK to item.track), ) { targetController = target this.listener = listener diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt index e43d8a7dd..6bbaa033a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt @@ -138,7 +138,7 @@ class AboutController : SettingsController(), NoAppBarElevationController { val outputDf = DateFormat.getDateTimeInstance( DateFormat.MEDIUM, DateFormat.SHORT, - Locale.getDefault() + Locale.getDefault(), ) outputDf.timeZone = TimeZone.getDefault() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt index 7d1521ce8..cb52be32f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/more/NewUpdateDialogController.kt @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.ui.base.controller.DialogController class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundle) { constructor(update: AppUpdateResult.NewUpdate) : this( - bundleOf(BODY_KEY to update.release.info, URL_KEY to update.release.getDownloadLink()) + bundleOf(BODY_KEY to update.release.info, URL_KEY to update.release.getDownloadLink()), ) override fun onCreateDialog(savedViewState: Bundle?): Dialog { 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 e99d1d0d8..d0cd94f2a 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 @@ -48,5 +48,5 @@ private val strokeColor = Color.rgb(45, 45, 45) // A span object with text outlining properties private val spanOutline = OutlineSpan( strokeColor = strokeColor, - strokeWidth = 4f + strokeWidth = 4f, ) 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 230bb091e..98bd969dd 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 @@ -349,7 +349,7 @@ class ReaderActivity : BaseRxActivity() { action = MainActivity.SHORTCUT_MANGA putExtra(MangaController.MANGA_EXTRA, id) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) - } + }, ) } } @@ -363,7 +363,7 @@ class ReaderActivity : BaseRxActivity() { override fun onStopTrackingTouch(slider: Slider) { isScrollingThroughPages = false } - }) + },) binding.pageSlider.addOnChangeListener { slider, value, fromUser -> if (viewer != null && fromUser) { isScrollingThroughPages = true @@ -406,13 +406,13 @@ class ReaderActivity : BaseRxActivity() { it.foreground = RippleDrawable( ColorStateList.valueOf(getThemeColor(android.R.attr.colorControlHighlight)), null, - it.background + it.background, ) } val toolbarColor = ColorUtils.setAlphaComponent( toolbarBackground.resolvedTintColor, - toolbarBackground.alpha + toolbarBackground.alpha, ) window.statusBarColor = toolbarColor if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { @@ -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) @@ -465,7 +465,7 @@ class ReaderActivity : BaseRxActivity() { R.string.on } else { R.string.off - } + }, ) } } @@ -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) @@ -530,7 +530,7 @@ class ReaderActivity : BaseRxActivity() { R.drawable.ic_crop_24dp } else { R.drawable.ic_crop_off_24dp - } + }, ) } @@ -553,7 +553,7 @@ class ReaderActivity : BaseRxActivity() { // Fix status bar being translucent the first time it's opened. window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) } - } + }, ) binding.toolbar.startAnimation(toolbarAnimation) @@ -579,7 +579,7 @@ class ReaderActivity : BaseRxActivity() { override fun onAnimationEnd(animation: Animation) { binding.readerMenu.isVisible = false } - } + }, ) binding.toolbar.startAnimation(toolbarAnimation) @@ -610,7 +610,7 @@ class ReaderActivity : BaseRxActivity() { if (window.sharedElementEnterTransition is MaterialContainerTransform) { // Wait until transition is complete to avoid crash on API 26 window.sharedElementEnterTransition.addListener( - onEnd = { setOrientation(presenter.getMangaOrientationType()) } + onEnd = { setOrientation(presenter.getMangaOrientationType()) }, ) } else { setOrientation(presenter.getMangaOrientationType()) @@ -832,7 +832,7 @@ class ReaderActivity : BaseRxActivity() { val intent = uri.toShareIntent( context = applicationContext, - message = getString(R.string.share_page_info, manga.title, chapter.name, page.number) + message = getString(R.string.share_page_info, manga.title, chapter.name, page.number), ) startActivity(Intent.createChooser(intent, getString(R.string.action_share))) } @@ -878,7 +878,7 @@ class ReaderActivity : BaseRxActivity() { Success -> R.string.cover_updated AddToLibraryFirst -> R.string.notification_first_add_to_library Error -> R.string.notification_cover_update_failed - } + }, ) } @@ -925,12 +925,12 @@ class ReaderActivity : BaseRxActivity() { -1f, 0f, 0f, 0f, 255f, 0f, -1f, 0f, 0f, 255f, 0f, 0f, -1f, 0f, 255f, - 0f, 0f, 0f, 1f, 0f - ) - ) + 0f, 0f, 0f, 1f, 0f, + ), + ), ) } - } + }, ) } } @@ -947,7 +947,7 @@ class ReaderActivity : BaseRxActivity() { 2 -> R.color.reader_background_dark 3 -> automaticBackgroundColor() else -> android.R.color.black - } + }, ) } .launchIn(lifecycleScope) 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 454d0148a..fb954bab7 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 @@ -225,7 +225,7 @@ class ReaderPresenter( { _, _ -> // Ignore onNext event }, - ReaderActivity::setInitialChapterError + ReaderActivity::setInitialChapterError, ) } @@ -260,7 +260,7 @@ class ReaderPresenter( { _, _ -> // Ignore onNext event }, - ReaderActivity::setInitialChapterError + ReaderActivity::setInitialChapterError, ) } @@ -283,9 +283,9 @@ class ReaderPresenter( ViewerChapters( chapter, chapterList.getOrNull(chapterPos - 1), - chapterList.getOrNull(chapterPos + 1) + chapterList.getOrNull(chapterPos + 1), ) - } + }, ) .observeOn(AndroidSchedulers.mainThread()) .doOnNext { newChapters -> @@ -336,7 +336,7 @@ class ReaderPresenter( }, { _, _ -> // Ignore onError event, viewers handle that state - } + }, ) } @@ -531,7 +531,7 @@ class ReaderPresenter( view.setManga(manga) view.setChapters(currChapters) } - }) + },) } /** @@ -562,7 +562,7 @@ class ReaderPresenter( if (currChapters != null) { view.setOrientation(getMangaOrientationType()) } - }) + },) } /** @@ -575,7 +575,7 @@ class ReaderPresenter( val chapter = page.chapter.chapter val filenameSuffix = " - ${page.number}" return DiskUtil.buildValidFilename( - "${manga.title} - ${chapter.name}".takeBytes(MAX_FILE_NAME_BYTES - filenameSuffix.byteSize()) + "${manga.title} - ${chapter.name}".takeBytes(MAX_FILE_NAME_BYTES - filenameSuffix.byteSize()), ) + filenameSuffix } @@ -603,8 +603,8 @@ class ReaderPresenter( image = Image.Page( inputStream = page.stream!!, name = filename, - location = Location.Pictures.create(relativePath) - ) + location = Location.Pictures.create(relativePath), + ), ) launchUI { notifier.onComplete(uri) @@ -640,8 +640,8 @@ class ReaderPresenter( image = Image.Page( inputStream = page.stream!!, name = filename, - location = Location.Cache - ) + location = Location.Cache, + ), ) launchUI { view!!.onShareImageResult(uri, page) @@ -683,7 +683,7 @@ class ReaderPresenter( .observeOn(AndroidSchedulers.mainThread()) .subscribeFirst( { view, result -> view.onSetAsCoverResult(result) }, - { view, _ -> view.onSetAsCoverResult(SetAsCoverResult.Error) } + { view, _ -> view.onSetAsCoverResult(SetAsCoverResult.Error) }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt index 66f4e160e..5a9744613 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/SaveImageNotifier.kt @@ -47,7 +47,7 @@ class SaveImageNotifier(private val context: Context) { }, onError = { onError(null) - } + }, ) .build() context.imageLoader.enqueue(request) @@ -69,13 +69,13 @@ class SaveImageNotifier(private val context: Context) { addAction( R.drawable.ic_share_24dp, context.getString(R.string.action_share), - NotificationReceiver.shareImagePendingBroadcast(context, uri.path!!, notificationId) + NotificationReceiver.shareImagePendingBroadcast(context, uri.path!!, notificationId), ) // Delete action addAction( R.drawable.ic_delete_24dp, context.getString(R.string.action_delete), - NotificationReceiver.deleteImagePendingBroadcast(context, uri.path!!, notificationId) + NotificationReceiver.deleteImagePendingBroadcast(context, uri.path!!, notificationId), ) updateNotification() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/EpubPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/EpubPageLoader.kt index 99764ac7b..611d21882 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/EpubPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/EpubPageLoader.kt @@ -49,7 +49,7 @@ class EpubPageLoader(file: File) : PageLoader() { Page.ERROR } else { Page.READY - } + }, ) } } 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 3ef63b533..3c3645f4d 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 @@ -54,7 +54,7 @@ class HttpPageLoader( if (error !is InterruptedException) { logcat(LogPriority.ERROR, error) } - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt index 3776aec34..5d9489317 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt @@ -63,7 +63,7 @@ class RarPageLoader(file: File) : PageLoader() { Page.ERROR } else { Page.READY - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt index f06af6562..3db97c8fa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt @@ -58,7 +58,7 @@ class ZipPageLoader(file: File) : PageLoader() { Page.ERROR } else { Page.READY - } + }, ) } } 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 a10705273..3c5f1109d 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 @@ -54,7 +54,7 @@ class ReaderSettingsSheet( activity.setMenuVisibility(!isFilterTab) } } - }) + },) if (showColorFilterSettings) { binding.tabs.getTabAt(filterTabIndex)?.select() @@ -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/ReaderPageImageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt index 7fe01a105..7e97847da 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 @@ -102,7 +102,7 @@ open class ReaderPageImageView @JvmOverloads constructor( override fun onImageLoadError(e: Exception) { onImageLoadError() } - } + }, ) } } @@ -123,7 +123,7 @@ open class ReaderPageImageView @JvmOverloads constructor( .withEasing(EASE_IN_OUT_QUAD) .withInterruptible(true) .start() - }, 500) + }, 500,) } } @@ -233,7 +233,7 @@ open class ReaderPageImageView @JvmOverloads constructor( override fun onCenterChanged(newCenter: PointF?, origin: Int) { // Not used } - } + }, ) setOnClickListener { this@ReaderPageImageView.onViewClicked() } } @@ -271,7 +271,7 @@ open class ReaderPageImageView @JvmOverloads constructor( override fun onImageLoadError(e: Exception) { this@ReaderPageImageView.onImageLoadError() } - } + }, ) when (image) { @@ -314,7 +314,7 @@ open class ReaderPageImageView @JvmOverloads constructor( this@ReaderPageImageView.onViewClicked() return super.onSingleTapConfirmed(e) } - } + }, ) setOnScaleChangeListener { _, _, _ -> this@ReaderPageImageView.onScaleChanged(scale) @@ -350,7 +350,7 @@ open class ReaderPageImageView @JvmOverloads constructor( }, onError = { this@ReaderPageImageView.onImageLoadError() - } + }, ) .crossfade(false) .build() 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 9fa6b4726..e565ee878 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 @@ -31,7 +31,7 @@ class ReaderProgressIndicator @JvmOverloads constructor( Animation.RELATIVE_TO_SELF, 0.5F, Animation.RELATIVE_TO_SELF, - 0.5F + 0.5F, ).apply { interpolator = LinearInterpolator() repeatCount = Animation.INFINITE 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 605e673ff..224747466 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 @@ -24,7 +24,7 @@ abstract class ViewerNavigation { fun invert(invertMode: PreferenceValues.TappingInvertMode): Region { if (invertMode == PreferenceValues.TappingInvertMode.NONE) return this return this.copy( - rectF = this.rectF.invert(invertMode) + rectF = this.rectF.invert(invertMode), ) } } 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 7208133d2..7440b1e35 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 @@ -18,15 +18,15 @@ class EdgeNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0f, 0f, 0.33f, 1f), - type = NavigationRegion.NEXT + type = NavigationRegion.NEXT, ), Region( rectF = RectF(0.33f, 0.66f, 0.66f, 1f), - type = NavigationRegion.PREV + type = NavigationRegion.PREV, ), Region( rectF = RectF(0.66f, 0f, 1f, 1f), - type = NavigationRegion.NEXT - ) + type = NavigationRegion.NEXT, + ), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/KindlishNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/KindlishNavigation.kt index 43c081f87..21bf053eb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/KindlishNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/KindlishNavigation.kt @@ -18,11 +18,11 @@ class KindlishNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0.33f, 0.33f, 1f, 1f), - type = NavigationRegion.NEXT + type = NavigationRegion.NEXT, ), Region( rectF = RectF(0f, 0.33f, 0.33f, 1f), - type = NavigationRegion.PREV - ) + type = NavigationRegion.PREV, + ), ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt index 6d3390818..8f94a6100 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/navigation/LNavigation.kt @@ -18,19 +18,19 @@ open class LNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0f, 0.33f, 0.33f, 0.66f), - type = NavigationRegion.PREV + type = NavigationRegion.PREV, ), Region( rectF = RectF(0f, 0f, 1f, 0.33f), - type = NavigationRegion.PREV + type = NavigationRegion.PREV, ), Region( rectF = RectF(0.66f, 0.33f, 1f, 0.66f), - type = NavigationRegion.NEXT + type = NavigationRegion.NEXT, ), Region( rectF = RectF(0f, 0.66f, 1f, 1f), - type = NavigationRegion.NEXT - ) + 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 a159796da..b660000f2 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 @@ -18,11 +18,11 @@ class RightAndLeftNavigation : ViewerNavigation() { override var regions: List = listOf( Region( rectF = RectF(0f, 0f, 0.33f, 1f), - type = NavigationRegion.LEFT + type = NavigationRegion.LEFT, ), Region( rectF = RectF(0.66f, 0f, 1f, 1f), - type = NavigationRegion.RIGHT - ) + type = NavigationRegion.RIGHT, + ), ) } 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 bf50dc202..0ad374363 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 @@ -55,7 +55,7 @@ class PagerConfig( theme = it automaticBackground = it == 3 }, - { imagePropertyChangedListener?.invoke() } + { imagePropertyChangedListener?.invoke() }, ) preferences.imageScaleType() @@ -89,7 +89,7 @@ class PagerConfig( { imagePropertyChangedListener?.invoke() dualPageSplitChangedListener?.invoke(it) - } + }, ) preferences.dualPageInvertPaged() 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 c62170128..7cfea4cc9 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 @@ -227,8 +227,8 @@ class PagerPageHolder( minimumScaleType = viewer.config.imageScaleType, cropBorders = viewer.config.imageCropBorders, zoomStartPosition = viewer.config.imageZoomType, - landscapeZoom = viewer.config.landscapeZoom - ) + landscapeZoom = viewer.config.landscapeZoom, + ), ) if (!isAnimated) { pageBackground = background diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt index 77591e1df..8322285d2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt @@ -92,7 +92,7 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer { override fun onPageScrollStateChanged(state: Int) { isIdle = state == ViewPager.SCROLL_STATE_IDLE } - } + }, ) pager.tapListener = f@{ event -> val pos = PointF(event.rawX / pager.width, event.rawY / pager.height) 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 d6891f704..c8b23b673 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 @@ -260,8 +260,8 @@ class WebtoonPageHolder( ReaderPageImageView.Config( zoomDuration = viewer.config.doubleTapAnimDuration, minimumScaleType = SubsamplingScaleImageView.SCALE_TYPE_FIT_WIDTH, - cropBorders = viewer.config.imageCropBorders - ) + cropBorders = viewer.config.imageCropBorders, + ), ) } // Keep the Rx stream alive to close the input stream only when unsubscribed 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 1063eb226..62670320d 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 @@ -164,7 +164,7 @@ open class WebtoonRecyclerView @JvmOverloads constructor( currentScale *= scaleFactor currentScale = currentScale.coerceIn( MIN_RATE, - MAX_SCALE_RATE + MAX_SCALE_RATE, ) setScaleRate(currentScale) 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 fea243197..c88b405a6 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 @@ -104,7 +104,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr } } } - } + }, ) recycler.tapListener = f@{ event -> val pos = PointF(event.rawX / recycler.width, event.rawY / recycler.height) @@ -344,7 +344,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr adapter.refresh() adapter.notifyItemRangeChanged( max(0, position - 3), - min(position + 3, adapter.itemCount - 1) + min(position + 3, adapter.itemCount - 1), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt index 3042d7ca7..8c1a88ec8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt @@ -30,7 +30,7 @@ class HistoryAdapter(controller: HistoryController) : val decimalFormat = DecimalFormat( "#.###", DecimalFormatSymbols() - .apply { decimalSeparator = '.' } + .apply { decimalSeparator = '.' }, ) init { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt index e0b8a206a..333dea3d4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt @@ -211,7 +211,7 @@ class HistoryController : // Fixes problem with the overflow icon showing up in lieu of search searchItem.fixExpand( - onExpand = { invalidateMenuOnExpand() } + onExpand = { invalidateMenuOnExpand() }, ) } 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 8875f96ee..8164e5cc8 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 @@ -58,7 +58,7 @@ class HistoryHolder( binding.mangaSubtitle.text = itemView.context.getString( R.string.recent_manga_time, formattedNumber, - Date(history.last_read).toTimestampString() + Date(history.last_read).toTimestampString(), ) } else { binding.mangaSubtitle.text = Date(history.last_read).toTimestampString() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt index 1c03d5fd9..e8feb084d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryPresenter.kt @@ -47,7 +47,7 @@ class HistoryPresenter : BasePresenter() { { view, mangas -> view.onNextManga(mangas) }, - HistoryController::onAddPageError + HistoryController::onAddPageError, ) } @@ -96,7 +96,7 @@ class HistoryPresenter : BasePresenter() { { view, mangas -> view.onNextManga(mangas, true) }, - HistoryController::onAddPageError + HistoryController::onAddPageError, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesHolder.kt index 8fcdd22e0..25f2c4dd6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesHolder.kt @@ -46,7 +46,7 @@ class UpdatesHolder(private val view: View, private val adapter: UpdatesAdapter) } else { binding.mangaTitle.setTextColor(adapter.unreadColor) binding.chapterTitle.setTextColor( - if (item.bookmark) adapter.bookmarkedColor else adapter.unreadColorSecondary + if (item.bookmark) adapter.bookmarkedColor else adapter.unreadColorSecondary, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt index a22003a5a..3fa69379e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesPresenter.kt @@ -55,7 +55,7 @@ class UpdatesPresenter : BasePresenter() { }, { _, error -> logcat(LogPriority.ERROR, error) - } + }, ) downloadManager.queue.getProgressObservable() @@ -180,7 +180,7 @@ class UpdatesPresenter : BasePresenter() { { view, _ -> view.onChaptersDeleted() }, - UpdatesController::onChaptersDeletedError + UpdatesController::onChaptersDeletedError, ) } 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 1f91d30a2..a066bf64d 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 @@ -42,7 +42,7 @@ class UnlockActivity : BaseActivity() { preferences.lastAppUnlock().set(Date().time) finish() } - } + }, ) } } 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 822a3d762..dd873bcfa 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 22d508b40..b39e17140 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 @@ -41,21 +41,21 @@ class SettingsAppearanceController : SettingsController() { entriesRes = arrayOf( R.string.theme_system, R.string.theme_light, - R.string.theme_dark + R.string.theme_dark, ) entryValues = arrayOf( Values.ThemeMode.system.name, Values.ThemeMode.light.name, - Values.ThemeMode.dark.name + Values.ThemeMode.dark.name, ) } else { entriesRes = arrayOf( R.string.theme_light, - R.string.theme_dark + R.string.theme_dark, ) entryValues = arrayOf( Values.ThemeMode.light.name, - Values.ThemeMode.dark.name + Values.ThemeMode.dark.name, ) } @@ -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/SettingsBackupController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt index e1fde8e41..c5b79e647 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt @@ -114,7 +114,7 @@ class SettingsBackupController : SettingsController() { R.string.update_12hour, R.string.update_24hour, R.string.update_48hour, - R.string.update_weekly + R.string.update_weekly, ) entryValues = arrayOf("0", "6", "12", "24", "48", "168") summary = "%s" @@ -228,7 +228,7 @@ class SettingsBackupController : SettingsController() { R.string.categories, R.string.chapters, R.string.track, - R.string.history + R.string.history, ) .map { activity.getString(it) } val selected = options.map { true }.toBooleanArray() @@ -264,7 +264,7 @@ class SettingsBackupController : SettingsController() { class RestoreBackupDialog(bundle: Bundle? = null) : DialogController(bundle) { constructor(uri: Uri) : this( - bundleOf(KEY_URI to uri) + bundleOf(KEY_URI to uri), ) override fun onCreateDialog(savedViewState: Bundle?): Dialog { 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 796260e4c..b66a02a0b 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/SettingsDownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt index ea12889e1..82c7cc839 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt @@ -89,7 +89,7 @@ class SettingsDownloadController : SettingsController() { R.string.second_to_last, R.string.third_to_last, R.string.fourth_to_last, - R.string.fifth_to_last + R.string.fifth_to_last, ) entryValues = arrayOf("-1", "0", "1", "2", "3", "4") defaultValue = "-1" @@ -266,7 +266,7 @@ class SettingsDownloadController : SettingsController() { .setQuadStateMultiChoiceItems( message = R.string.pref_download_new_categories_details, items = items, - initialSelected = selected + initialSelected = selected, ) { selections -> selected = selections } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index 368710872..3c42ec80b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -27,7 +27,7 @@ class SettingsGeneralController : SettingsController() { R.string.label_library, R.string.label_recent_updates, R.string.label_recent_manga, - R.string.browse + R.string.browse, ) entryValues = arrayOf("1", "3", "2", "4") defaultValue = "1" 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 188c2bac3..98b9f3fa0 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 @@ -145,7 +145,7 @@ class SettingsLibraryController : SettingsController() { R.string.update_24hour, R.string.update_48hour, R.string.update_72hour, - R.string.update_weekly + R.string.update_weekly, ) entryValues = arrayOf("0", "12", "24", "48", "72", "168") summary = "%s" @@ -357,7 +357,7 @@ class SettingsLibraryController : SettingsController() { .setQuadStateMultiChoiceItems( message = R.string.pref_library_update_categories_details, items = items, - initialSelected = selected + initialSelected = selected, ) { selections -> selected = selections } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt index c24afb849..3c1de2a57 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt @@ -111,7 +111,7 @@ class SettingsMainController : SettingsController() { override fun onMenuItemActionCollapse(item: MenuItem?): Boolean { return true } - } + }, ) } } 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 7d0e9588e..e8af6c898 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 @@ -32,7 +32,7 @@ class SettingsReaderController : SettingsController() { R.string.right_to_left_viewer, R.string.vertical_viewer, R.string.webtoon_viewer, - R.string.vertical_plus_viewer + R.string.vertical_plus_viewer, ) entryValues = ReadingModeType.values().drop(1) .map { value -> "${value.flagValue}" }.toTypedArray() @@ -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() @@ -156,13 +156,13 @@ class SettingsReaderController : SettingsController() { R.string.tapping_inverted_none, R.string.tapping_inverted_horizontal, R.string.tapping_inverted_vertical, - R.string.tapping_inverted_both + R.string.tapping_inverted_both, ) entryValues = arrayOf( TappingInvertMode.NONE.name, TappingInvertMode.HORIZONTAL.name, TappingInvertMode.VERTICAL.name, - TappingInvertMode.BOTH.name + TappingInvertMode.BOTH.name, ) summary = "%s" } @@ -175,7 +175,7 @@ class SettingsReaderController : SettingsController() { R.string.scale_type_fit_width, R.string.scale_type_fit_height, R.string.scale_type_original_size, - R.string.scale_type_smart_fit + R.string.scale_type_smart_fit, ) entryValues = arrayOf("1", "2", "3", "4", "5", "6") summary = "%s" @@ -192,7 +192,7 @@ class SettingsReaderController : SettingsController() { R.string.zoom_start_automatic, R.string.zoom_start_left, R.string.zoom_start_right, - R.string.zoom_start_center + R.string.zoom_start_center, ) entryValues = arrayOf("1", "2", "3", "4") summary = "%s" @@ -235,13 +235,13 @@ class SettingsReaderController : SettingsController() { R.string.tapping_inverted_none, R.string.tapping_inverted_horizontal, R.string.tapping_inverted_vertical, - R.string.tapping_inverted_both + R.string.tapping_inverted_both, ) entryValues = arrayOf( TappingInvertMode.NONE.name, TappingInvertMode.HORIZONTAL.name, TappingInvertMode.VERTICAL.name, - TappingInvertMode.BOTH.name + TappingInvertMode.BOTH.name, ) summary = "%s" } @@ -254,7 +254,7 @@ class SettingsReaderController : SettingsController() { R.string.webtoon_side_padding_10, R.string.webtoon_side_padding_15, R.string.webtoon_side_padding_20, - R.string.webtoon_side_padding_25 + R.string.webtoon_side_padding_25, ) entryValues = arrayOf("0", "5", "10", "15", "20", "25") summary = "%s" @@ -266,7 +266,7 @@ class SettingsReaderController : SettingsController() { R.string.pref_highest, R.string.pref_high, R.string.pref_low, - R.string.pref_lowest + R.string.pref_lowest, ) entryValues = PreferenceValues.ReaderHideThreshold.values() .map { it.name } 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 fc06138b6..b37249766 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), ) } @@ -74,7 +74,7 @@ class SettingsSecurityController : SettingsController() { super.onAuthenticationError(activity, errorCode, errString) activity?.toast(errString.toString()) } - } + }, ) false } 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 dd661836f..f48068dad 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 @@ -117,7 +117,7 @@ class SettingsTrackingController : login() } } - } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchController.kt index 0cef27e87..462042abc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/search/SettingsSearchController.kt @@ -82,7 +82,7 @@ class SettingsSearchController : router.popCurrentController() return false } - } + }, ) searchView.setOnQueryTextListener( @@ -96,7 +96,7 @@ class SettingsSearchController : setItems(getResultSet(newText)) return false } - } + }, ) searchView.setQuery(presenter.preferences.lastSearchQuerySearchSettings().get(), true) 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 8ed8237f5..cb9366bf0 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 @@ -39,7 +39,7 @@ object SettingsSearchHelper { SettingsLibraryController::class, SettingsReaderController::class, SettingsSecurityController::class, - SettingsTrackingController::class + SettingsTrackingController::class, ) /** @@ -113,8 +113,8 @@ object SettingsSearchHelper { title = title, summary = summary, breadcrumb = breadcrumbsStr, - searchController = ctrl - ) + searchController = ctrl, + ), ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt index 1f73aac83..2c665a6bd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/track/BaseOAuthLoginActivity.kt @@ -27,8 +27,8 @@ abstract class BaseOAuthLoginActivity : BaseActivity() { FrameLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, - Gravity.CENTER - ) + Gravity.CENTER, + ), ) handleResult(intent.data) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt index b4715e4b7..4ffb31f66 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt @@ -58,12 +58,12 @@ class CrashLogUtil(private val context: Context) { addAction( R.drawable.ic_folder_24dp, context.getString(R.string.action_open_log), - NotificationReceiver.openErrorLogPendingActivity(context, uri) + NotificationReceiver.openErrorLogPendingActivity(context, uri), ) addAction( R.drawable.ic_share_24dp, context.getString(R.string.action_share), - NotificationReceiver.shareCrashLogPendingBroadcast(context, uri, Notifications.ID_CRASH_LOGS) + NotificationReceiver.shareCrashLogPendingBroadcast(context, uri, Notifications.ID_CRASH_LOGS), ) context.notificationManager.notify(Notifications.ID_CRASH_LOGS, build()) 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 170491595..3cf59811e 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 @@ -67,7 +67,7 @@ fun Long.toUtcCalendar(): Calendar? { rawCalendar.get(Calendar.DAY_OF_MONTH), rawCalendar.get(Calendar.HOUR_OF_DAY), rawCalendar.get(Calendar.MINUTE), - rawCalendar.get(Calendar.SECOND) + rawCalendar.get(Calendar.SECOND), ) } } @@ -92,7 +92,7 @@ fun Long.toLocalCalendar(): Calendar? { rawCalendar.get(Calendar.DAY_OF_MONTH), rawCalendar.get(Calendar.HOUR_OF_DAY), rawCalendar.get(Calendar.MINUTE), - rawCalendar.get(Calendar.SECOND) + rawCalendar.get(Calendar.SECOND), ) } } @@ -116,7 +116,7 @@ fun Date.toRelativeString( difference < MILLISECONDS_IN_DAY.times(range) -> context.resources.getQuantityString( R.plurals.relative_time, days, - days + days, ) else -> dateFormat.format(this) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/lang/Hash.kt b/app/src/main/java/eu/kanade/tachiyomi/util/lang/Hash.kt index a89063208..32d2a2d2e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/lang/Hash.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/lang/Hash.kt @@ -6,7 +6,7 @@ object Hash { private val chars = charArrayOf( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f' + 'a', 'b', 'c', 'd', 'e', 'f', ) private val MD5 get() = MessageDigest.getInstance("MD5") 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 c44f740b0..391a9a14e 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 @@ -35,8 +35,8 @@ private suspend fun Observable.awaitOne(): T = suspendCancellableCoroutin override fun onCompleted() { if (cont.isActive) cont.resumeWithException( IllegalStateException( - "Should have invoked onNext" - ) + "Should have invoked onNext", + ), ) } @@ -51,8 +51,8 @@ private suspend fun Observable.awaitOne(): T = suspendCancellableCoroutin cont.completeResume(token) } } - } - ) + }, + ), ) } @@ -80,6 +80,6 @@ fun runAsObservable( } emitter.setCancellation { job.cancel() } }, - backpressureMode + backpressureMode, ) } 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 1cda71267..772399b1a 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 @@ -44,7 +44,7 @@ inline fun PreferenceGroup.infoPreference(@StringRes infoRes: Int): Preference { iconTint = context.getResourceColor(android.R.attr.textColorHint) summaryRes = infoRes isSelectable = false - } + }, ) } @@ -156,7 +156,7 @@ inline fun SwitchPreferenceCompat.requireAuthentication(activity: FragmentActivi 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 1fd0a2ec7..f33c11566 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 @@ -39,7 +39,7 @@ object AuthenticatorUtil { subtitle = subtitle, confirmationRequired = confirmationRequired, executor = ContextCompat.getMainExecutor(this), - callback = callback + callback = callback, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt index 9ed470e9b..22c9fc440 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt @@ -380,7 +380,7 @@ object ImageUtil { return GradientDrawable( GradientDrawable.Orientation.TOP_BOTTOM, - gradient + gradient, ) } 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 df3aa3dce..6c6fba4ff 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 @@ -64,7 +64,7 @@ abstract class WebViewClientCompat : WebViewClient() { error.errorCode, error.description?.toString(), request.url.toString(), - request.isForMainFrame + request.isForMainFrame, ) } @@ -88,7 +88,7 @@ abstract class WebViewClientCompat : WebViewClient() { error.reasonPhrase, request.url .toString(), - request.isForMainFrame + request.isForMainFrame, ) } } 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 e70e9281d..3f6623cea 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 @@ -55,7 +55,7 @@ fun ImageView.loadAutoPause( }, onStart = { request -> originalListener?.onStart(request) }, onCancel = { request -> originalListener?.onCancel(request) }, - onError = { request, throwable -> originalListener?.onError(request, throwable) } + onError = { request, throwable -> originalListener?.onError(request, throwable) }, ) } } 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 28b197af5..f22faf8b7 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 @@ -211,7 +211,7 @@ fun RecyclerView.onAnimationsFinished(callback: (RecyclerView) -> Unit) = post( callback(this@onAnimationsFinished) } } - } + }, ) /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/WindowExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/WindowExtensions.kt index 98dd588d5..be387a656 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/WindowExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/WindowExtensions.kt @@ -22,7 +22,7 @@ fun Window.setNavigationBarTransparentCompat(context: Context, elevation: Float // Set navbar scrim 70% of navigationBarColor ElevationOverlayProvider(context).compositeOverlayIfNeeded( context.getResourceColor(android.R.attr.navigationBarColor, 0.7F), - elevation + elevation, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt index 7c9842319..9ab0bc115 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ActionModeWithToolbar.kt @@ -78,7 +78,7 @@ class ActionModeWithToolbar @JvmOverloads constructor(context: Context, attrs: A callback = null actionMode = null } - } + }, ) } binding.root.startAnimation(bottomAnimation) 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 21dd1f294..f0f368bac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt @@ -48,12 +48,12 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? val button = MaterialButton( buttonContext, null, - R.attr.borderlessButtonStyle + R.attr.borderlessButtonStyle, ).apply { layoutParams = LinearLayout.LayoutParams( 0, LinearLayout.LayoutParams.WRAP_CONTENT, - 1f / actions.size + 1f / actions.size, ) setTextColor(buttonColor) @@ -78,7 +78,7 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? "ಥ_ಥ", "(˘・_・˘)", "(; ̄Д ̄)", - "(・Д・。" + "(・Д・。", ) fun getRandomErrorFace(): String { 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 fa71554a1..648719b0e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/HideBottomNavigationOnScrollBehavior.kt @@ -99,7 +99,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor( } offsetAnimator?.setFloatValues( child.translationY, - if (isVisible) 0F else child.height.toFloat() + if (isVisible) 0F else child.height.toFloat(), ) offsetAnimator?.start() } 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 3b4618ad9..c98bcee89 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/MangaSummaryView.kt @@ -85,7 +85,7 @@ class MangaSummaryView @JvmOverloads constructor( val toggleDrawable = ContextCompat.getDrawable( context, - if (expanded) R.drawable.anim_caret_up else R.drawable.anim_caret_down + if (expanded) R.drawable.anim_caret_up else R.drawable.anim_caret_down, ) toggleMore.setImageDrawable(toggleDrawable) @@ -172,7 +172,7 @@ class MangaSummaryView @JvmOverloads constructor( description?.let { context.copyToClipboard( context.getString(R.string.description), - it.toString() + it.toString(), ) } true @@ -183,7 +183,7 @@ class MangaSummaryView @JvmOverloads constructor( binding.descriptionText, binding.descriptionScrim, binding.toggleMoreScrim, - binding.toggleMore + binding.toggleMore, ).forEach { it.setOnClickListener { expanded = !expanded } } 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 0b9ca04d9..d2c21c8d6 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/SimpleNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt index 45453a93c..3c6bd01e7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/SimpleNavigationView.kt @@ -40,7 +40,7 @@ open class SimpleNavigationView @JvmOverloads constructor( attrs, R.styleable.NavigationView, defStyleAttr, - R.style.Widget_Design_NavigationView + R.style.Widget_Design_NavigationView, ) a.recycle() 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 da42cdbee..89e2fff3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt @@ -90,7 +90,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( animateTranslation( 0F, SLIDE_UP_ANIMATION_DURATION, - LinearOutSlowInInterpolator() + LinearOutSlowInInterpolator(), ) } @@ -105,7 +105,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( animateTranslation( height.toFloat(), SLIDE_DOWN_ANIMATION_DURATION, - FastOutLinearInInterpolator() + FastOutLinearInInterpolator(), ) } @@ -120,7 +120,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( currentAnimator = null postInvalidate() } - }) + },) } internal class SavedState : AbsSavedState { 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 c9135bd25..33a18380d 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 @@ -52,7 +52,7 @@ fun MaterialAlertDialogBuilder.setQuadStateMultiChoiceItems( disabledItems = disabledIndices, initialSelected = initialSelected, isActionList = isActionList, - listener = selection + listener = selection, ) val updateScrollIndicators = { binding.scrollIndicatorUp.isVisible = binding.list.canScrollVertically(-1) 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 c6ee7f914..e9152f248 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 @@ -85,7 +85,7 @@ internal class QuadStateMultiChoiceDialogAdapter( return QuadStateMultiChoiceViewHolder( itemBinding = DialogQuadstatemultichoiceItemBinding .inflate(LayoutInflater.from(parent.context), parent, false), - adapter = this + adapter = this, ) } 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 ab97896e3..26bdaba09 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 @@ -20,7 +20,7 @@ class SwitchPreferenceCategory @JvmOverloads constructor( PreferenceCategory( context, attrs, - R.attr.switchPreferenceCompatStyle + R.attr.switchPreferenceCompatStyle, ), CompoundButton.OnCheckedChangeListener { @@ -120,7 +120,7 @@ class SwitchPreferenceCategory @JvmOverloads constructor( getPersistedBoolean(mChecked) } else { defaultValue as Boolean - } + }, ) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt index 330a1fcb0..ff07c56ed 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt @@ -42,7 +42,7 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib super.onScrolled(recyclerView, dx, dy) lastScrollPosition = recyclerView.computeHorizontalScrollOffset() } - }) + },) lastScrollPosition?.let { scrollToOffset(it) } } @@ -65,7 +65,7 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib scrollToPositionWithOffset( // 114dp is the width of the pref_theme_item layout lX / 114.dpToPx, - -lX % 114.dpToPx + -lX % 114.dpToPx, ) } lastScrollPosition = it.computeHorizontalScrollOffset() 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 8b05e7026..ac982efcf 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 @@ -49,6 +49,6 @@ class BottomSheetViewPager @JvmOverloads constructor( override fun onPageSelected(position: Int) { requestLayout() } - }) + },) } }