Update linter

This commit is contained in:
arkon
2022-04-08 15:30:30 -04:00
parent 37100f0937
commit f0eb42e72d
192 changed files with 318 additions and 437 deletions
@@ -25,7 +25,7 @@ class ChangeMangaCategoriesDialog<T>(bundle: Bundle? = null) :
target: T,
mangas: List<Manga>,
categories: List<Category>,
preselected: Array<Int>
preselected: Array<Int>,
) : this() {
this.mangas = mangas
this.categories = categories
@@ -24,7 +24,7 @@ class DeleteLibraryMangasDialog<T>(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)
}
@@ -21,7 +21,7 @@ import uy.kohesive.injekt.api.get
*/
class LibraryAdapter(
private val controller: LibraryController,
private val preferences: PreferencesHelper = Injekt.get()
private val preferences: PreferencesHelper = Injekt.get(),
) : RecyclerViewPagerAdapter() {
/**
@@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
*/
class LibraryComfortableGridHolder(
override val binding: SourceComfortableGridItemBinding,
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
) : LibraryHolder<SourceComfortableGridItemBinding>(binding.root, adapter) {
/**
@@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
class LibraryCompactGridHolder(
override val binding: SourceCompactGridItemBinding,
adapter: FlexibleAdapter<*>,
private val coverOnly: Boolean
private val coverOnly: Boolean,
) : LibraryHolder<SourceCompactGridItemBinding>(binding.root, adapter) {
/**
@@ -51,7 +51,7 @@ import java.util.concurrent.TimeUnit
class LibraryController(
bundle: Bundle? = null,
private val preferences: PreferencesHelper = Injekt.get()
private val preferences: PreferencesHelper = Injekt.get(),
) : SearchableNucleusController<LibraryControllerBinding, LibraryPresenter>(bundle),
RootController,
TabbedController,
@@ -282,7 +282,7 @@ class LibraryController(
EmptyView.Action(R.string.getting_started_guide, R.drawable.ic_help_24dp) {
activity?.openInBrowser("https://tachiyomi.org/help/guides/getting-started")
}
),
)
)
(activity as? MainActivity)?.ready = true
}
@@ -14,7 +14,7 @@ import eu.davidea.viewholders.FlexibleViewHolder
abstract class LibraryHolder<VB : ViewBinding>(
view: View,
adapter: FlexibleAdapter<*>
adapter: FlexibleAdapter<*>,
) : FlexibleViewHolder(view, adapter) {
abstract val binding: VB
@@ -19,7 +19,7 @@ import uy.kohesive.injekt.api.get
class LibraryItem(
val manga: LibraryManga,
private val shouldSetFromCategory: Preference<Boolean>,
private val defaultLibraryDisplayMode: Preference<DisplayModeSetting>
private val defaultLibraryDisplayMode: Preference<DisplayModeSetting>,
) :
AbstractFlexibleItem<LibraryHolder<*>>(), IFilterable<String> {
@@ -68,7 +68,7 @@ class LibraryItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: LibraryHolder<*>,
position: Int,
payloads: List<Any?>?
payloads: List<Any?>?,
) {
holder.onSetValues(this)
}
@@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.databinding.SourceListItemBinding
*/
class LibraryListHolder(
private val view: View,
private val adapter: FlexibleAdapter<*>
private val adapter: FlexibleAdapter<*>,
) : LibraryHolder<SourceListItemBinding>(view, adapter) {
override val binding = SourceListItemBinding.bind(view)
@@ -53,7 +53,7 @@ class LibraryPresenter(
private val coverCache: CoverCache = Injekt.get(),
private val sourceManager: SourceManager = Injekt.get(),
private val downloadManager: DownloadManager = Injekt.get(),
private val trackManager: TrackManager = Injekt.get()
private val trackManager: TrackManager = Injekt.get(),
) : BasePresenter<LibraryController>() {
private val context = preferences.context
@@ -23,7 +23,7 @@ import uy.kohesive.injekt.injectLazy
class LibrarySettingsSheet(
router: Router,
private val trackManager: TrackManager = Injekt.get(),
onGroupClickListener: (ExtendedNavigationView.Group) -> Unit
onGroupClickListener: (ExtendedNavigationView.Group) -> Unit,
) : TabbedBottomSheetDialog(router.activity!!) {
val filters: Filter