From a3f1b721269b421dde67b8fd4e7017cf6c891c06 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 11 Apr 2021 18:16:15 -0400 Subject: [PATCH] Lint fixes/ignore some errors --- .../kanade/tachiyomi/data/preference/PreferenceValues.kt | 4 ++++ .../kanade/tachiyomi/ui/browse/source/SourceController.kt | 5 ++++- .../browse/source/globalsearch/GlobalSearchController.kt | 7 ++++++- .../eu/kanade/tachiyomi/ui/library/LibraryController.kt | 5 ++++- .../java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 7 ++++++- build.gradle.kts | 3 +++ 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt index 1588b5d33..13cda3269 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt @@ -5,6 +5,8 @@ package eu.kanade.tachiyomi.data.preference */ object PreferenceValues { + /* ktlint-disable experimental:enum-entry-name-case */ + // Keys are lowercase to match legacy string values enum class ThemeMode { light, @@ -25,6 +27,8 @@ object PreferenceValues { amoled, } + /* ktlint-enable experimental:enum-entry-name-case */ + enum class DisplayMode { COMPACT_GRID, COMFORTABLE_GRID, 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 e0cf253d2..f0a2dc17d 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 @@ -25,7 +25,10 @@ import eu.kanade.tachiyomi.databinding.SourceMainControllerBinding import eu.kanade.tachiyomi.source.CatalogueSource import eu.kanade.tachiyomi.source.LocalSource import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.ui.base.controller.* +import eu.kanade.tachiyomi.ui.base.controller.DialogController +import eu.kanade.tachiyomi.ui.base.controller.SearchableNucleusController +import eu.kanade.tachiyomi.ui.base.controller.requestPermissionsSafe +import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.browse.BrowseController import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchController 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 bdd672ec0..b6dc40a14 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 @@ -1,7 +1,12 @@ package eu.kanade.tachiyomi.ui.browse.source.globalsearch import android.os.Bundle -import android.view.* +import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem +import android.view.View +import android.view.ViewGroup import androidx.appcompat.widget.SearchView import androidx.core.view.isVisible import androidx.recyclerview.widget.LinearLayoutManager 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 dda4e664b..f9ada2c8c 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 @@ -26,7 +26,10 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.asImmediateFlow import eu.kanade.tachiyomi.databinding.LibraryControllerBinding import eu.kanade.tachiyomi.source.LocalSource -import eu.kanade.tachiyomi.ui.base.controller.* +import eu.kanade.tachiyomi.ui.base.controller.RootController +import eu.kanade.tachiyomi.ui.base.controller.SearchableNucleusController +import eu.kanade.tachiyomi.ui.base.controller.TabbedController +import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchController import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.manga.MangaController 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 32d6bb108..e7deac4b8 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 @@ -10,7 +10,12 @@ import android.graphics.Bitmap import android.graphics.Color import android.os.Build import android.os.Bundle -import android.view.* +import android.view.Gravity +import android.view.KeyEvent +import android.view.Menu +import android.view.MenuItem +import android.view.MotionEvent +import android.view.WindowManager import android.view.animation.Animation import android.view.animation.AnimationUtils import android.widget.SeekBar diff --git a/build.gradle.kts b/build.gradle.kts index 0fbe41bfd..c5766a18a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,9 @@ subprojects { kotlinter { experimentalRules = true + + // Doesn't play well with Android Studio + disabledRules = arrayOf("experimental:argument-list-wrapping") } }