Update linter
This commit is contained in:
@@ -425,7 +425,7 @@ class MangaController :
|
||||
when (item.itemId) {
|
||||
R.id.action_share -> shareManga()
|
||||
R.id.download_next, R.id.download_next_5, R.id.download_next_10,
|
||||
R.id.download_custom, R.id.download_unread, R.id.download_all
|
||||
R.id.download_custom, R.id.download_unread, R.id.download_all,
|
||||
-> downloadChapters(item.itemId)
|
||||
|
||||
R.id.action_edit_categories -> onCategoriesClick()
|
||||
@@ -532,7 +532,7 @@ class MangaController :
|
||||
if (duplicateManga != null) {
|
||||
showAddDuplicateDialog(
|
||||
manga,
|
||||
duplicateManga,
|
||||
duplicateManga
|
||||
)
|
||||
} else {
|
||||
addToLibrary(manga)
|
||||
@@ -545,11 +545,11 @@ class MangaController :
|
||||
val source = sourceManager.getOrStub(libraryManga.source)
|
||||
MaterialAlertDialogBuilder(it).apply {
|
||||
setMessage(activity?.getString(R.string.confirm_manga_add_duplicate, source.name))
|
||||
setPositiveButton(activity?.getString(R.string.action_add)) { _, _, ->
|
||||
setPositiveButton(activity?.getString(R.string.action_add)) { _, _ ->
|
||||
addToLibrary(newManga)
|
||||
}
|
||||
setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _, -> }
|
||||
setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _, ->
|
||||
setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _ -> }
|
||||
setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _ ->
|
||||
router.pushController(MangaController(libraryManga).withFadeTransaction())
|
||||
}
|
||||
setCancelable(true)
|
||||
@@ -703,7 +703,7 @@ class MangaController :
|
||||
previousController.search(query)
|
||||
}
|
||||
is UpdatesController,
|
||||
is HistoryController -> {
|
||||
is HistoryController, -> {
|
||||
// Manually navigate to LibraryController
|
||||
router.handleBack()
|
||||
(router.activity as MainActivity).setSelectedNavItem(R.id.nav_library)
|
||||
@@ -960,7 +960,7 @@ class MangaController :
|
||||
intent.apply {
|
||||
putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true)
|
||||
},
|
||||
activityOptions.toBundle(),
|
||||
activityOptions.toBundle()
|
||||
)
|
||||
} else {
|
||||
startActivity(intent)
|
||||
|
||||
@@ -66,7 +66,7 @@ class MangaPresenter(
|
||||
private val db: DatabaseHelper = Injekt.get(),
|
||||
private val trackManager: TrackManager = Injekt.get(),
|
||||
private val downloadManager: DownloadManager = Injekt.get(),
|
||||
private val coverCache: CoverCache = Injekt.get()
|
||||
private val coverCache: CoverCache = Injekt.get(),
|
||||
) : BasePresenter<MangaController>() {
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Date
|
||||
|
||||
class ChapterHolder(
|
||||
view: View,
|
||||
private val adapter: ChaptersAdapter
|
||||
private val adapter: ChaptersAdapter,
|
||||
) : BaseChapterHolder(view, adapter) {
|
||||
|
||||
private val binding = ChaptersItemBinding.bind(view)
|
||||
|
||||
@@ -26,7 +26,7 @@ class ChapterItem(chapter: Chapter, val manga: Manga) :
|
||||
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
|
||||
holder: ChapterHolder,
|
||||
position: Int,
|
||||
payloads: List<Any?>?
|
||||
payloads: List<Any?>?,
|
||||
) {
|
||||
holder.bind(this, manga)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.text.DecimalFormatSymbols
|
||||
|
||||
class ChaptersAdapter(
|
||||
controller: MangaController,
|
||||
context: Context
|
||||
context: Context,
|
||||
) : BaseChaptersAdapter<ChapterItem>(controller) {
|
||||
|
||||
private val preferences: PreferencesHelper by injectLazy()
|
||||
|
||||
@@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog
|
||||
class ChaptersSettingsSheet(
|
||||
private val router: Router,
|
||||
private val presenter: MangaPresenter,
|
||||
private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit
|
||||
private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit,
|
||||
) : TabbedBottomSheetDialog(router.activity!!) {
|
||||
|
||||
val filters = Filter(router.activity!!)
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
|
||||
class MangaChaptersHeaderAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<MangaChaptersHeaderAdapter.HeaderViewHolder>() {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.util.view.popupMenu
|
||||
|
||||
open class BaseChapterHolder(
|
||||
view: View,
|
||||
private val adapter: BaseChaptersAdapter<*>
|
||||
private val adapter: BaseChaptersAdapter<*>,
|
||||
) : FlexibleViewHolder(view, adapter) {
|
||||
|
||||
fun onDownloadClick(view: View, position: Int) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.source.model.Page
|
||||
|
||||
abstract class BaseChapterItem<T : BaseChapterHolder, H : AbstractHeaderItem<*>>(
|
||||
val chapter: Chapter,
|
||||
header: H? = null
|
||||
header: H? = null,
|
||||
) :
|
||||
AbstractSectionableItem<T, H?>(header),
|
||||
Chapter by chapter {
|
||||
|
||||
@@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.databinding.TrackSearchItemBinding
|
||||
|
||||
class TrackSearchAdapter(
|
||||
private val currentTrackUrl: String?,
|
||||
private val onSelectionChanged: (TrackSearch?) -> Unit
|
||||
private val onSelectionChanged: (TrackSearch?) -> Unit,
|
||||
) : RecyclerView.Adapter<TrackSearchHolder>() {
|
||||
var selectedItemPosition = -1
|
||||
set(value) {
|
||||
|
||||
@@ -45,7 +45,7 @@ class TrackSearchDialog : DialogController {
|
||||
constructor(
|
||||
target: MangaController,
|
||||
_service: TrackService,
|
||||
_currentTrackUrl: String?
|
||||
_currentTrackUrl: String?,
|
||||
) : super(bundleOf(KEY_SERVICE to _service.id, KEY_CURRENT_URL to _currentTrackUrl)) {
|
||||
targetController = target
|
||||
service = _service
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Locale
|
||||
|
||||
class TrackSearchHolder(
|
||||
private val binding: TrackSearchItemBinding,
|
||||
private val adapter: TrackSearchAdapter
|
||||
private val adapter: TrackSearchAdapter,
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
fun bind(track: TrackSearch, position: Int) {
|
||||
binding.root.isChecked = position == adapter.selectedItemPosition
|
||||
|
||||
@@ -31,7 +31,7 @@ class TrackSheet(
|
||||
val controller: MangaController,
|
||||
val manga: Manga,
|
||||
val fragmentManager: FragmentManager,
|
||||
private val sourceManager: SourceManager = Injekt.get()
|
||||
private val sourceManager: SourceManager = Injekt.get(),
|
||||
) : BaseBottomSheetDialog(controller.activity!!),
|
||||
TrackAdapter.OnClickListener,
|
||||
SetTrackStatusDialog.Listener,
|
||||
|
||||
Reference in New Issue
Block a user