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

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*.{kt,kts}]
indent_size=4
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true

View File

@ -112,7 +112,7 @@ abstract class AbstractBackupRestore<T : AbstractBackupManager>(protected val co
internal fun showRestoreProgress( internal fun showRestoreProgress(
progress: Int, progress: Int,
amount: Int, amount: Int,
title: String title: String,
) { ) {
notifier.showRestoreProgress(title, progress, amount) notifier.showRestoreProgress(title, progress, amount)
} }

View File

@ -144,7 +144,7 @@ class BackupNotifier(private val context: Context) {
addAction( addAction(
R.drawable.ic_folder_24dp, R.drawable.ic_folder_24dp,
context.getString(R.string.action_show_errors), context.getString(R.string.action_show_errors),
errorLogIntent, errorLogIntent
) )
} }

View File

@ -93,7 +93,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>, categories: List<Int>,
history: List<BackupHistory>, history: List<BackupHistory>,
tracks: List<Track>, tracks: List<Track>,
backupCategories: List<BackupCategory> backupCategories: List<BackupCategory>,
) { ) {
db.inTransaction { db.inTransaction {
val dbManga = backupManager.getMangaFromDatabase(manga) val dbManga = backupManager.getMangaFromDatabase(manga)
@ -123,7 +123,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>, categories: List<Int>,
history: List<BackupHistory>, history: List<BackupHistory>,
tracks: List<Track>, tracks: List<Track>,
backupCategories: List<BackupCategory> backupCategories: List<BackupCategory>,
) { ) {
try { try {
val fetchedManga = backupManager.restoreManga(manga) val fetchedManga = backupManager.restoreManga(manga)
@ -143,7 +143,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>, categories: List<Int>,
history: List<BackupHistory>, history: List<BackupHistory>,
tracks: List<Track>, tracks: List<Track>,
backupCategories: List<BackupCategory> backupCategories: List<BackupCategory>,
) { ) {
backupManager.restoreChaptersForManga(backupManga, chapters) backupManager.restoreChaptersForManga(backupManga, chapters)

View File

@ -9,5 +9,5 @@ data class Backup(
@ProtoNumber(2) var backupCategories: List<BackupCategory> = emptyList(), @ProtoNumber(2) var backupCategories: List<BackupCategory> = emptyList(),
// Bump by 100 to specify this is a 0.x value // Bump by 100 to specify this is a 0.x value
@ProtoNumber(100) var backupBrokenSources: List<BrokenBackupSource> = emptyList(), @ProtoNumber(100) var backupBrokenSources: List<BrokenBackupSource> = emptyList(),
@ProtoNumber(101) var backupSources: List<BackupSource> = emptyList() @ProtoNumber(101) var backupSources: List<BackupSource> = emptyList(),
) )

View File

@ -6,11 +6,11 @@ import kotlinx.serialization.protobuf.ProtoNumber
@Serializable @Serializable
data class BrokenBackupHistory( data class BrokenBackupHistory(
@ProtoNumber(0) var url: String, @ProtoNumber(0) var url: String,
@ProtoNumber(1) var lastRead: Long @ProtoNumber(1) var lastRead: Long,
) )
@Serializable @Serializable
data class BackupHistory( data class BackupHistory(
@ProtoNumber(1) var url: String, @ProtoNumber(1) var url: String,
@ProtoNumber(2) var lastRead: Long @ProtoNumber(2) var lastRead: Long,
) )

View File

@ -35,7 +35,7 @@ data class BackupManga(
@ProtoNumber(101) var chapterFlags: Int = 0, @ProtoNumber(101) var chapterFlags: Int = 0,
@ProtoNumber(102) var brokenHistory: List<BrokenBackupHistory> = emptyList(), @ProtoNumber(102) var brokenHistory: List<BrokenBackupHistory> = emptyList(),
@ProtoNumber(103) var viewer_flags: Int? = null, @ProtoNumber(103) var viewer_flags: Int? = null,
@ProtoNumber(104) var history: List<BackupHistory> = emptyList() @ProtoNumber(104) var history: List<BackupHistory> = emptyList(),
) { ) {
fun getMangaImpl(): MangaImpl { fun getMangaImpl(): MangaImpl {
return MangaImpl().apply { return MangaImpl().apply {

View File

@ -7,13 +7,13 @@ import kotlinx.serialization.protobuf.ProtoNumber
@Serializable @Serializable
data class BrokenBackupSource( data class BrokenBackupSource(
@ProtoNumber(0) var name: String = "", @ProtoNumber(0) var name: String = "",
@ProtoNumber(1) var sourceId: Long @ProtoNumber(1) var sourceId: Long,
) )
@Serializable @Serializable
data class BackupSource( data class BackupSource(
@ProtoNumber(1) var name: String = "", @ProtoNumber(1) var name: String = "",
@ProtoNumber(2) var sourceId: Long @ProtoNumber(2) var sourceId: Long,
) { ) {
companion object { companion object {
fun copyFrom(source: Source): BackupSource { fun copyFrom(source: Source): BackupSource {

View File

@ -109,7 +109,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>, chapters: List<Chapter>,
categories: List<String>, categories: List<String>,
history: List<DHistory>, history: List<DHistory>,
tracks: List<Track> tracks: List<Track>,
) { ) {
val dbManga = backupManager.getMangaFromDatabase(manga) val dbManga = backupManager.getMangaFromDatabase(manga)
@ -139,7 +139,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>, chapters: List<Chapter>,
categories: List<String>, categories: List<String>,
history: List<DHistory>, history: List<DHistory>,
tracks: List<Track> tracks: List<Track>,
) { ) {
try { try {
val fetchedManga = backupManager.fetchManga(source, manga) val fetchedManga = backupManager.fetchManga(source, manga)
@ -161,7 +161,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>, chapters: List<Chapter>,
categories: List<String>, categories: List<String>,
history: List<DHistory>, history: List<DHistory>,
tracks: List<Track> tracks: List<Track>,
) { ) {
if (!backupManager.restoreChaptersForManga(backupManga, chapters)) { if (!backupManager.restoreChaptersForManga(backupManga, chapters)) {
updateChapters(source, backupManga, chapters) updateChapters(source, backupManga, chapters)

View File

@ -15,7 +15,7 @@ data class Backup(
val version: Int? = null, val version: Int? = null,
var mangas: MutableList<MangaObject> = mutableListOf(), var mangas: MutableList<MangaObject> = mutableListOf(),
var categories: List<@Contextual Category>? = null, var categories: List<@Contextual Category>? = null,
var extensions: List<String>? = null var extensions: List<String>? = null,
) { ) {
companion object { companion object {
const val CURRENT_VERSION = 2 const val CURRENT_VERSION = 2
@ -33,5 +33,5 @@ data class MangaObject(
var chapters: List<@Contextual Chapter>? = null, var chapters: List<@Contextual Chapter>? = null,
var categories: List<String>? = null, var categories: List<String>? = null,
var track: List<@Contextual Track>? = null, var track: List<@Contextual Track>? = null,
var history: List<@Contextual DHistory>? = null var history: List<@Contextual DHistory>? = null,
) )

View File

@ -47,7 +47,7 @@ class MangaCoverFetcher(
private val options: Options, private val options: Options,
private val coverCache: CoverCache, private val coverCache: CoverCache,
private val callFactoryLazy: Lazy<Call.Factory>, private val callFactoryLazy: Lazy<Call.Factory>,
private val diskCacheLazy: Lazy<DiskCache> private val diskCacheLazy: Lazy<DiskCache>,
) : Fetcher { ) : Fetcher {
// For non-custom cover // For non-custom cover
@ -273,7 +273,7 @@ class MangaCoverFetcher(
class Factory( class Factory(
private val callFactoryLazy: Lazy<Call.Factory>, private val callFactoryLazy: Lazy<Call.Factory>,
private val diskCacheLazy: Lazy<DiskCache> private val diskCacheLazy: Lazy<DiskCache>,
) : Fetcher.Factory<Manga> { ) : Fetcher.Factory<Manga> {
private val coverCache: CoverCache by injectLazy() private val coverCache: CoverCache by injectLazy()

View File

@ -42,7 +42,7 @@ interface MangaQueries : DbProvider {
.where("${MangaTable.COL_FAVORITE} = 1 AND LOWER(${MangaTable.COL_TITLE}) = ? AND ${MangaTable.COL_SOURCE} != ?") .where("${MangaTable.COL_FAVORITE} = 1 AND LOWER(${MangaTable.COL_TITLE}) = ? AND ${MangaTable.COL_SOURCE} != ?")
.whereArgs( .whereArgs(
manga.title.lowercase(), manga.title.lowercase(),
manga.source, manga.source
) )
.limit(1) .limit(1)
.build() .build()

View File

@ -73,7 +73,7 @@ object TrackTable {
|INSERT INTO $TABLE($COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE) |INSERT INTO $TABLE($COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE)
|SELECT $COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE |SELECT $COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE
|FROM ${TABLE}_tmp |FROM ${TABLE}_tmp
""".trimMargin() """.trimMargin()
val dropTempTable: String val dropTempTable: String
get() = "DROP TABLE ${TABLE}_tmp" get() = "DROP TABLE ${TABLE}_tmp"

View File

@ -27,7 +27,7 @@ class DownloadCache(
private val context: Context, private val context: Context,
private val provider: DownloadProvider, private val provider: DownloadProvider,
private val sourceManager: SourceManager, private val sourceManager: SourceManager,
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) { ) {
/** /**
@ -236,7 +236,7 @@ class DownloadCache(
*/ */
private class RootDirectory( private class RootDirectory(
val dir: UniFile, val dir: UniFile,
var files: Map<Long, SourceDirectory> = hashMapOf() var files: Map<Long, SourceDirectory> = hashMapOf(),
) )
/** /**
@ -244,7 +244,7 @@ class DownloadCache(
*/ */
private class SourceDirectory( private class SourceDirectory(
val dir: UniFile, val dir: UniFile,
var files: Map<String, MangaDirectory> = hashMapOf() var files: Map<String, MangaDirectory> = hashMapOf(),
) )
/** /**
@ -252,7 +252,7 @@ class DownloadCache(
*/ */
private class MangaDirectory( private class MangaDirectory(
val dir: UniFile, val dir: UniFile,
var files: Set<String> = hashSetOf() var files: Set<String> = hashSetOf(),
) )
/** /**

View File

@ -30,7 +30,7 @@ import uy.kohesive.injekt.injectLazy
*/ */
class DownloadManager( class DownloadManager(
private val context: Context, private val context: Context,
private val db: DatabaseHelper = Injekt.get() private val db: DatabaseHelper = Injekt.get(),
) { ) {
private val sourceManager: SourceManager by injectLazy() private val sourceManager: SourceManager by injectLazy()

View File

@ -126,7 +126,7 @@ class DownloadPendingDeleter(context: Context) {
@Serializable @Serializable
private data class Entry( private data class Entry(
val chapters: List<ChapterEntry>, val chapters: List<ChapterEntry>,
val manga: MangaEntry val manga: MangaEntry,
) )
/** /**
@ -137,7 +137,7 @@ class DownloadPendingDeleter(context: Context) {
val id: Long, val id: Long,
val url: String, val url: String,
val name: String, val name: String,
val scanlator: String? = null val scanlator: String? = null,
) )
/** /**
@ -148,7 +148,7 @@ class DownloadPendingDeleter(context: Context) {
val id: Long, val id: Long,
val url: String, val url: String,
val title: String, val title: String,
val source: Long val source: Long,
) )
/** /**

View File

@ -177,7 +177,9 @@ class DownloadService : Service() {
*/ */
private fun listenDownloaderState() { private fun listenDownloaderState() {
subscriptions += downloadManager.runningRelay subscriptions += downloadManager.runningRelay
.doOnError { /* Swallow wakelock error */ } .doOnError {
/* Swallow wakelock error */
}
.subscribe { running -> .subscribe { running ->
if (running) { if (running) {
wakeLock.acquireIfNeeded() wakeLock.acquireIfNeeded()

View File

@ -20,7 +20,7 @@ import uy.kohesive.injekt.injectLazy
*/ */
class DownloadStore( class DownloadStore(
context: Context, context: Context,
private val sourceManager: SourceManager private val sourceManager: SourceManager,
) { ) {
/** /**

View File

@ -60,7 +60,7 @@ class Downloader(
private val context: Context, private val context: Context,
private val provider: DownloadProvider, private val provider: DownloadProvider,
private val cache: DownloadCache, private val cache: DownloadCache,
private val sourceManager: SourceManager private val sourceManager: SourceManager,
) { ) {
private val chapterCache: ChapterCache by injectLazy() private val chapterCache: ChapterCache by injectLazy()
@ -478,7 +478,7 @@ class Downloader(
download: Download, download: Download,
mangaDir: UniFile, mangaDir: UniFile,
tmpDir: UniFile, tmpDir: UniFile,
dirname: String dirname: String,
) { ) {
// Ensure that the chapter folder has all the images. // Ensure that the chapter folder has all the images.
val downloadedImages = tmpDir.listFiles().orEmpty().filterNot { it.name!!.endsWith(".tmp") } val downloadedImages = tmpDir.listFiles().orEmpty().filterNot { it.name!!.endsWith(".tmp") }

View File

@ -11,7 +11,7 @@ import java.util.concurrent.CopyOnWriteArrayList
class DownloadQueue( class DownloadQueue(
private val store: DownloadStore, private val store: DownloadStore,
private val queue: MutableList<Download> = CopyOnWriteArrayList() private val queue: MutableList<Download> = CopyOnWriteArrayList(),
) : List<Download> by queue { ) : List<Download> by queue {
private val statusSubject = PublishSubject.create<Download>() private val statusSubject = PublishSubject.create<Download>()

View File

@ -77,7 +77,7 @@ class LibraryUpdateService(
val preferences: PreferencesHelper = Injekt.get(), val preferences: PreferencesHelper = Injekt.get(),
val downloadManager: DownloadManager = Injekt.get(), val downloadManager: DownloadManager = Injekt.get(),
val trackManager: TrackManager = Injekt.get(), val trackManager: TrackManager = Injekt.get(),
val coverCache: CoverCache = Injekt.get() val coverCache: CoverCache = Injekt.get(),
) : Service() { ) : Service() {
private lateinit var wakeLock: PowerManager.WakeLock private lateinit var wakeLock: PowerManager.WakeLock
@ -310,7 +310,7 @@ class LibraryUpdateService(
withUpdateNotification( withUpdateNotification(
currentlyUpdatingManga, currentlyUpdatingManga,
progressCount, progressCount,
manga, manga
) { manga -> ) { manga ->
try { try {
when { when {
@ -383,7 +383,7 @@ class LibraryUpdateService(
val errorFile = writeErrorFile(failedUpdates) val errorFile = writeErrorFile(failedUpdates)
notifier.showUpdateErrorNotification( notifier.showUpdateErrorNotification(
failedUpdates.size, failedUpdates.size,
errorFile.getUriCompat(this), errorFile.getUriCompat(this)
) )
} }
if (skippedUpdates.isNotEmpty()) { if (skippedUpdates.isNotEmpty()) {
@ -446,7 +446,7 @@ class LibraryUpdateService(
withUpdateNotification( withUpdateNotification(
currentlyUpdatingManga, currentlyUpdatingManga,
progressCount, progressCount,
manga, manga
) { manga -> ) { manga ->
sourceManager.get(manga.source)?.let { source -> sourceManager.get(manga.source)?.let { source ->
try { try {

View File

@ -461,7 +461,7 @@ class NotificationReceiver : BroadcastReceiver() {
context: Context, context: Context,
manga: Manga, manga: Manga,
chapters: Array<Chapter>, chapters: Array<Chapter>,
groupId: Int groupId: Int,
): PendingIntent { ): PendingIntent {
val newIntent = Intent(context, NotificationReceiver::class.java).apply { val newIntent = Intent(context, NotificationReceiver::class.java).apply {
action = ACTION_MARK_AS_READ action = ACTION_MARK_AS_READ
@ -483,7 +483,7 @@ class NotificationReceiver : BroadcastReceiver() {
context: Context, context: Context,
manga: Manga, manga: Manga,
chapters: Array<Chapter>, chapters: Array<Chapter>,
groupId: Int groupId: Int,
): PendingIntent { ): PendingIntent {
val newIntent = Intent(context, NotificationReceiver::class.java).apply { val newIntent = Intent(context, NotificationReceiver::class.java).apply {
action = ACTION_DOWNLOAD_CHAPTER action = ACTION_DOWNLOAD_CHAPTER

View File

@ -87,7 +87,7 @@ object Notifications {
"backup_restore_complete_channel", "backup_restore_complete_channel",
"library_channel", "library_channel",
"library_progress_channel", "library_progress_channel",
"updates_ext_channel", "updates_ext_channel"
) )
/** /**
@ -115,7 +115,7 @@ object Notifications {
}, },
buildNotificationChannelGroup(GROUP_APK_UPDATES) { buildNotificationChannelGroup(GROUP_APK_UPDATES) {
setName(context.getString(R.string.label_recent_updates)) setName(context.getString(R.string.label_recent_updates))
}, }
) )
) )
@ -181,7 +181,7 @@ object Notifications {
buildNotificationChannel(CHANNEL_EXTENSIONS_UPDATE, IMPORTANCE_DEFAULT) { buildNotificationChannel(CHANNEL_EXTENSIONS_UPDATE, IMPORTANCE_DEFAULT) {
setGroup(GROUP_APK_UPDATES) setGroup(GROUP_APK_UPDATES)
setName(context.getString(R.string.channel_ext_updates)) setName(context.getString(R.string.channel_ext_updates))
}, }
) )
) )
} }

View File

@ -20,7 +20,7 @@ import java.io.File
import java.io.InputStream import java.io.InputStream
class ImageSaver( class ImageSaver(
val context: Context val context: Context,
) { ) {
@SuppressLint("InlinedApi") @SuppressLint("InlinedApi")
@ -83,18 +83,18 @@ class ImageSaver(
sealed class Image( sealed class Image(
open val name: String, open val name: String,
open val location: Location open val location: Location,
) { ) {
data class Cover( data class Cover(
val bitmap: Bitmap, val bitmap: Bitmap,
override val name: String, override val name: String,
override val location: Location override val location: Location,
) : Image(name, location) ) : Image(name, location)
data class Page( data class Page(
val inputStream: () -> InputStream, val inputStream: () -> InputStream,
override val name: String, override val name: String,
override val location: Location override val location: Location,
) : Image(name, location) ) : Image(name, location)
val data: () -> InputStream val data: () -> InputStream

View File

@ -43,7 +43,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
| status | status
|} |}
|} |}
|""".trimMargin() |
""".trimMargin()
val payload = buildJsonObject { val payload = buildJsonObject {
put("query", query) put("query", query)
putJsonObject("variables") { putJsonObject("variables") {
@ -84,7 +85,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|progress |progress
|} |}
|} |}
|""".trimMargin() |
""".trimMargin()
val payload = buildJsonObject { val payload = buildJsonObject {
put("query", query) put("query", query)
putJsonObject("variables") { putJsonObject("variables") {
@ -127,7 +129,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|} |}
|} |}
|} |}
|""".trimMargin() |
""".trimMargin()
val payload = buildJsonObject { val payload = buildJsonObject {
put("query", query) put("query", query)
putJsonObject("variables") { putJsonObject("variables") {
@ -193,7 +196,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|} |}
|} |}
|} |}
|""".trimMargin() |
""".trimMargin()
val payload = buildJsonObject { val payload = buildJsonObject {
put("query", query) put("query", query)
putJsonObject("variables") { putJsonObject("variables") {
@ -238,7 +242,8 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|} |}
|} |}
|} |}
|""".trimMargin() |
""".trimMargin()
val payload = buildJsonObject { val payload = buildJsonObject {
put("query", query) put("query", query)
} }

View File

@ -16,7 +16,7 @@ data class ALManga(
val format: String, val format: String,
val publishing_status: String, val publishing_status: String,
val start_date_fuzzy: Long, val start_date_fuzzy: Long,
val total_chapters: Int val total_chapters: Int,
) { ) {
fun toTrack() = TrackSearch.create(TrackManager.ANILIST).apply { fun toTrack() = TrackSearch.create(TrackManager.ANILIST).apply {
@ -46,7 +46,7 @@ data class ALUserManga(
val chapters_read: Int, val chapters_read: Int,
val start_date_fuzzy: Long, val start_date_fuzzy: Long,
val completed_date_fuzzy: Long, val completed_date_fuzzy: Long,
val manga: ALManga val manga: ALManga,
) { ) {
fun toTrack() = Track.create(TrackManager.ANILIST).apply { fun toTrack() = Track.create(TrackManager.ANILIST).apply {

View File

@ -7,7 +7,7 @@ data class OAuth(
val access_token: String, val access_token: String,
val token_type: String, val token_type: String,
val expires: Long, val expires: Long,
val expires_in: Long val expires_in: Long,
) { ) {
fun isExpired() = System.currentTimeMillis() > expires fun isExpired() = System.currentTimeMillis() > expires

View File

@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable
data class Avatar( data class Avatar(
val large: String? = "", val large: String? = "",
val medium: String? = "", val medium: String? = "",
val small: String? = "" val small: String? = "",
) )

View File

@ -12,5 +12,5 @@ data class Collection(
val status: Status? = Status(), val status: Status? = Status(),
val tag: List<String?>? = listOf(), val tag: List<String?>? = listOf(),
val user: User? = User(), val user: User? = User(),
val vol_status: Int? = 0 val vol_status: Int? = 0,
) )

View File

@ -9,7 +9,7 @@ data class OAuth(
val created_at: Long = System.currentTimeMillis() / 1000, val created_at: Long = System.currentTimeMillis() / 1000,
val expires_in: Long, val expires_in: Long,
val refresh_token: String?, val refresh_token: String?,
val user_id: Long? val user_id: Long?,
) { ) {
// Access token refresh before expired // Access token refresh before expired

View File

@ -6,5 +6,5 @@ import kotlinx.serialization.Serializable
data class Status( data class Status(
val id: Int? = 0, val id: Int? = 0,
val name: String? = "", val name: String? = "",
val type: String? = "" val type: String? = "",
) )

View File

@ -10,5 +10,5 @@ data class User(
val sign: String? = "", val sign: String? = "",
val url: String? = "", val url: String? = "",
val usergroup: Int? = 0, val usergroup: Int? = 0,
val username: String? = "" val username: String? = "",
) )

View File

@ -39,7 +39,7 @@ class DelayedTrackingStore(context: Context) {
DelayedTrackingItem( DelayedTrackingItem(
trackId = it.key.toLong(), trackId = it.key.toLong(),
mangaId = mangaId.toLong(), mangaId = mangaId.toLong(),
lastChapterRead = lastChapterRead.toFloat(), lastChapterRead = lastChapterRead.toFloat()
) )
} }
} }

View File

@ -137,7 +137,7 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
"X-Algolia-Application-Id", "X-Algolia-Application-Id",
algoliaAppId, algoliaAppId,
"X-Algolia-API-Key", "X-Algolia-API-Key",
key, key
), ),
body = jsonObject.toString().toRequestBody(jsonMime) body = jsonObject.toString().toRequestBody(jsonMime)
) )

View File

@ -8,7 +8,7 @@ data class OAuth(
val token_type: String, val token_type: String,
val created_at: Long, val created_at: Long,
val expires_in: Long, val expires_in: Long,
val refresh_token: String? val refresh_token: String?,
) { ) {
fun isExpired() = (System.currentTimeMillis() / 1000) > (created_at + expires_in - 3600) fun isExpired() = (System.currentTimeMillis() / 1000) > (created_at + expires_in - 3600)

View File

@ -15,7 +15,7 @@ data class SeriesDto(
val booksUnreadCount: Int, val booksUnreadCount: Int,
val booksInProgressCount: Int, val booksInProgressCount: Int,
val metadata: SeriesMetadataDto, val metadata: SeriesMetadataDto,
val booksMetadata: BookMetadataAggregationDto val booksMetadata: BookMetadataAggregationDto,
) )
@Serializable @Serializable
@ -38,7 +38,7 @@ data class SeriesMetadataDto(
val genres: Set<String>, val genres: Set<String>,
val genresLock: Boolean, val genresLock: Boolean,
val tags: Set<String>, val tags: Set<String>,
val tagsLock: Boolean val tagsLock: Boolean,
) )
@Serializable @Serializable
@ -49,13 +49,13 @@ data class BookMetadataAggregationDto(
val summaryNumber: String, val summaryNumber: String,
val created: String, val created: String,
val lastModified: String val lastModified: String,
) )
@Serializable @Serializable
data class AuthorDto( data class AuthorDto(
val name: String, val name: String,
val role: String val role: String,
) )
@Serializable @Serializable
@ -75,7 +75,7 @@ data class ReadListDto(
val bookIds: List<String>, val bookIds: List<String>,
val createdDate: String, val createdDate: String,
val lastModifiedDate: String, val lastModifiedDate: String,
val filtered: Boolean val filtered: Boolean,
) )
@Serializable @Serializable
@ -92,7 +92,7 @@ data class ReadProgressDto(
booksUnreadCount, booksUnreadCount,
booksInProgressCount, booksInProgressCount,
lastReadContinuousIndex.toFloat(), lastReadContinuousIndex.toFloat(),
booksCount.toFloat(), booksCount.toFloat()
) )
} }

View File

@ -8,7 +8,7 @@ data class OAuth(
val access_token: String, val access_token: String,
val token_type: String, val token_type: String,
val created_at: Long = System.currentTimeMillis(), val created_at: Long = System.currentTimeMillis(),
val expires_in: Long val expires_in: Long,
) { ) {
fun isExpired() = System.currentTimeMillis() > created_at + (expires_in * 1000) fun isExpired() = System.currentTimeMillis() > created_at + (expires_in * 1000)

View File

@ -8,7 +8,7 @@ data class OAuth(
val token_type: String, val token_type: String,
val created_at: Long, val created_at: Long,
val expires_in: Long, val expires_in: Long,
val refresh_token: String? val refresh_token: String?,
) { ) {
// Access token lives 1 day // Access token lives 1 day

View File

@ -47,12 +47,12 @@ internal class AppUpdateNotifier(private val context: Context) {
addAction( addAction(
android.R.drawable.stat_sys_download_done, android.R.drawable.stat_sys_download_done,
context.getString(R.string.action_download), context.getString(R.string.action_download),
updateIntent, updateIntent
) )
addAction( addAction(
R.drawable.ic_info_24dp, R.drawable.ic_info_24dp,
context.getString(R.string.whats_new), context.getString(R.string.whats_new),
releaseInfoIntent, releaseInfoIntent
) )
} }
notificationBuilder.show() notificationBuilder.show()

View File

@ -12,7 +12,7 @@ data class GithubRelease(
@SerialName("tag_name") val version: String, @SerialName("tag_name") val version: String,
@SerialName("body") val info: String, @SerialName("body") val info: String,
@SerialName("html_url") val releaseLink: String, @SerialName("html_url") val releaseLink: String,
@SerialName("assets") private val assets: List<Assets> @SerialName("assets") private val assets: List<Assets>,
) { ) {
/** /**

View File

@ -36,7 +36,7 @@ import uy.kohesive.injekt.api.get
*/ */
class ExtensionManager( class ExtensionManager(
private val context: Context, private val context: Context,
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) { ) {
/** /**

View File

@ -125,6 +125,6 @@ private data class ExtensionJsonObject(
private data class ExtensionSourceJsonObject( private data class ExtensionSourceJsonObject(
val name: String, val name: String,
val id: Long, val id: Long,
val baseUrl: String val baseUrl: String,
) )

View File

@ -28,7 +28,7 @@ sealed class Extension {
val icon: Drawable?, val icon: Drawable?,
val hasUpdate: Boolean = false, val hasUpdate: Boolean = false,
val isObsolete: Boolean = false, val isObsolete: Boolean = false,
val isUnofficial: Boolean = false val isUnofficial: Boolean = false,
) : Extension() ) : Extension()
data class Available( data class Available(
@ -42,7 +42,7 @@ sealed class Extension {
override val hasChangelog: Boolean, override val hasChangelog: Boolean,
val sources: List<AvailableExtensionSources>, val sources: List<AvailableExtensionSources>,
val apkName: String, val apkName: String,
val iconUrl: String val iconUrl: String,
) : Extension() ) : Extension()
data class Untrusted( data class Untrusted(
@ -61,5 +61,5 @@ sealed class Extension {
data class AvailableExtensionSources( data class AvailableExtensionSources(
val name: String, val name: String,
val id: Long, val id: Long,
val baseUrl: String val baseUrl: String,
) )

View File

@ -72,7 +72,7 @@ class ExtensionInstallService : Service() {
context: Context, context: Context,
downloadId: Long, downloadId: Long,
uri: Uri, uri: Uri,
installer: PreferenceValues.ExtensionInstaller installer: PreferenceValues.ExtensionInstaller,
): Intent { ): Intent {
return Intent(context, ExtensionInstallService::class.java) return Intent(context, ExtensionInstallService::class.java)
.setDataAndType(uri, ExtensionInstaller.APK_MIME) .setDataAndType(uri, ExtensionInstaller.APK_MIME)

View File

@ -26,7 +26,7 @@ fun OkHttpClient.Builder.dohCloudflare() = dns(
InetAddress.getByName("2606:4700:4700::1111"), InetAddress.getByName("2606:4700:4700::1111"),
InetAddress.getByName("2606:4700:4700::1001"), InetAddress.getByName("2606:4700:4700::1001"),
InetAddress.getByName("2606:4700:4700::0064"), InetAddress.getByName("2606:4700:4700::0064"),
InetAddress.getByName("2606:4700:4700::6400"), InetAddress.getByName("2606:4700:4700::6400")
) )
.build() .build()
) )
@ -38,7 +38,7 @@ fun OkHttpClient.Builder.dohGoogle() = dns(
InetAddress.getByName("8.8.4.4"), InetAddress.getByName("8.8.4.4"),
InetAddress.getByName("8.8.8.8"), InetAddress.getByName("8.8.8.8"),
InetAddress.getByName("2001:4860:4860::8888"), InetAddress.getByName("2001:4860:4860::8888"),
InetAddress.getByName("2001:4860:4860::8844"), InetAddress.getByName("2001:4860:4860::8844")
) )
.build() .build()
) )
@ -52,7 +52,7 @@ fun OkHttpClient.Builder.dohAdGuard() = dns(
InetAddress.getByName("94.140.14.140"), InetAddress.getByName("94.140.14.140"),
InetAddress.getByName("94.140.14.141"), InetAddress.getByName("94.140.14.141"),
InetAddress.getByName("2a10:50c0::1:ff"), InetAddress.getByName("2a10:50c0::1:ff"),
InetAddress.getByName("2a10:50c0::2:ff"), InetAddress.getByName("2a10:50c0::2:ff")
) )
.build() .build()
) )
@ -64,7 +64,7 @@ fun OkHttpClient.Builder.dohQuad9() = dns(
InetAddress.getByName("9.9.9.9"), InetAddress.getByName("9.9.9.9"),
InetAddress.getByName("149.112.112.112"), InetAddress.getByName("149.112.112.112"),
InetAddress.getByName("2620:fe::fe"), InetAddress.getByName("2620:fe::fe"),
InetAddress.getByName("2620:fe::9"), InetAddress.getByName("2620:fe::9")
) )
.build() .build()
) )

View File

@ -14,7 +14,7 @@ private val DEFAULT_BODY: RequestBody = FormBody.Builder().build()
fun GET( fun GET(
url: String, url: String,
headers: Headers = DEFAULT_HEADERS, headers: Headers = DEFAULT_HEADERS,
cache: CacheControl = DEFAULT_CACHE_CONTROL cache: CacheControl = DEFAULT_CACHE_CONTROL,
): Request { ): Request {
return Request.Builder() return Request.Builder()
.url(url) .url(url)
@ -27,7 +27,7 @@ fun POST(
url: String, url: String,
headers: Headers = DEFAULT_HEADERS, headers: Headers = DEFAULT_HEADERS,
body: RequestBody = DEFAULT_BODY, body: RequestBody = DEFAULT_BODY,
cache: CacheControl = DEFAULT_CACHE_CONTROL cache: CacheControl = DEFAULT_CACHE_CONTROL,
): Request { ): Request {
return Request.Builder() return Request.Builder()
.url(url) .url(url)

View File

@ -135,7 +135,7 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
errorCode: Int, errorCode: Int,
description: String?, description: String?,
failingUrl: String, failingUrl: String,
isMainFrame: Boolean isMainFrame: Boolean,
) { ) {
if (isMainFrame) { if (isMainFrame) {
if (errorCode in ERROR_CODES) { if (errorCode in ERROR_CODES) {

View File

@ -186,7 +186,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
artist = obj["artist"]?.jsonPrimitive?.contentOrNull ?: manga.artist, artist = obj["artist"]?.jsonPrimitive?.contentOrNull ?: manga.artist,
description = obj["description"]?.jsonPrimitive?.contentOrNull ?: manga.description, description = obj["description"]?.jsonPrimitive?.contentOrNull ?: manga.description,
genres = obj["genre"]?.jsonArray?.map { it.jsonPrimitive.content } ?: manga.genres, 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 { } else {
manga manga
@ -353,5 +353,5 @@ private val WHITESPACE_CHARS = arrayOf(
'\u2029', '\u2029',
'\u202F', '\u202F',
'\u205F', '\u205F',
'\u3000', '\u3000'
) )

View File

@ -12,7 +12,7 @@ open class Page(
val index: Int, val index: Int,
val url: String = "", val url: String = "",
var imageUrl: String? = null, var imageUrl: String? = null,
@Transient var uri: Uri? = null // Deprecated but can't be deleted due to extensions @Transient var uri: Uri? = null, // Deprecated but can't be deleted due to extensions
) : ProgressListener { ) : ProgressListener {
val number: Int val number: Int

View File

@ -25,7 +25,7 @@ class OneWayFadeChangeHandler : FadeChangeHandler {
from: View?, from: View?,
to: View?, to: View?,
isPush: Boolean, isPush: Boolean,
toAddedToContainer: Boolean toAddedToContainer: Boolean,
): Animator { ): Animator {
val animator = AnimatorSet() val animator = AnimatorSet()
if (to != null) { if (to != null) {

View File

@ -21,8 +21,7 @@ import reactivecircus.flowbinding.appcompat.queryTextEvents
/** /**
* Implementation of the NucleusController that has a built-in ViewSearch * Implementation of the NucleusController that has a built-in ViewSearch
*/ */
abstract class SearchableNucleusController<VB : ViewBinding, P : BasePresenter<*>> abstract class SearchableNucleusController<VB : ViewBinding, P : BasePresenter<*>>(bundle: Bundle? = null) : NucleusController<VB, P>(bundle) {
(bundle: Bundle? = null) : NucleusController<VB, P>(bundle) {
enum class SearchViewState { LOADING, LOADED, COLLAPSING, FOCUSED } enum class SearchViewState { LOADING, LOADED, COLLAPSING, FOCUSED }
@ -45,7 +44,7 @@ abstract class SearchableNucleusController<VB : ViewBinding, P : BasePresenter<*
menuId: Int, menuId: Int,
searchItemId: Int, searchItemId: Int,
@StringRes queryHint: Int? = null, @StringRes queryHint: Int? = null,
restoreCurrentQuery: Boolean = true restoreCurrentQuery: Boolean = true,
) { ) {
// Inflate menu // Inflate menu
inflater.inflate(menuId, menu) inflater.inflate(menuId, menu)

View File

@ -16,7 +16,7 @@ import eu.kanade.tachiyomi.R
data class ExtensionGroupItem( data class ExtensionGroupItem(
val name: String, val name: String,
val size: Int, val size: Int,
val showSize: Boolean = false val showSize: Boolean = false,
) : AbstractHeaderItem<ExtensionGroupHolder>() { ) : AbstractHeaderItem<ExtensionGroupHolder>() {
var actionLabel: String? = null var actionLabel: String? = null
@ -43,7 +43,7 @@ data class ExtensionGroupItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: ExtensionGroupHolder, holder: ExtensionGroupHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.source.CatalogueSource
data class ExtensionItem( data class ExtensionItem(
val extension: Extension, val extension: Extension,
val header: ExtensionGroupItem? = null, val header: ExtensionGroupItem? = null,
val installStep: InstallStep = InstallStep.Idle val installStep: InstallStep = InstallStep.Idle,
) : ) :
AbstractSectionableItem<ExtensionHolder, ExtensionGroupItem>(header) { AbstractSectionableItem<ExtensionHolder, ExtensionGroupItem>(header) {
@ -44,7 +44,7 @@ data class ExtensionItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: ExtensionHolder, holder: ExtensionHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
if (payloads == null || payloads.isEmpty()) { if (payloads == null || payloads.isEmpty()) {
holder.bind(this) holder.bind(this)

View File

@ -26,7 +26,7 @@ private typealias ExtensionTuple =
*/ */
open class ExtensionPresenter( open class ExtensionPresenter(
private val extensionManager: ExtensionManager = Injekt.get(), private val extensionManager: ExtensionManager = Injekt.get(),
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) : BasePresenter<ExtensionController>() { ) : BasePresenter<ExtensionController>() {
private var extensions = emptyList<ExtensionItem>() private var extensions = emptyList<ExtensionItem>()
@ -64,7 +64,7 @@ open class ExtensionPresenter(
val items = mutableListOf<ExtensionItem>() val items = mutableListOf<ExtensionItem>()
val updatesSorted = installed.filter { it.hasUpdate && (showNsfwSources || !it.isNsfw) } val updatesSorted = installed.filter { it.hasUpdate && (showNsfwSources || !it.isNsfw) }
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, { it.name })) .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name })
val installedSorted = installed.filter { !it.hasUpdate && (showNsfwSources || !it.isNsfw) } val installedSorted = installed.filter { !it.hasUpdate && (showNsfwSources || !it.isNsfw) }
.sortedWith( .sortedWith(
@ -72,7 +72,7 @@ open class ExtensionPresenter(
.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 })) val untrustedSorted = untrusted.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name })
val availableSorted = available val availableSorted = available
// Filter out already installed extensions and disabled languages // Filter out already installed extensions and disabled languages
@ -82,7 +82,7 @@ open class ExtensionPresenter(
avail.lang in activeLangs && avail.lang in activeLangs &&
(showNsfwSources || !avail.isNsfw) (showNsfwSources || !avail.isNsfw)
} }
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER, { it.name })) .sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name })
if (updatesSorted.isNotEmpty()) { if (updatesSorted.isNotEmpty()) {
val header = ExtensionGroupItem(context.getString(R.string.ext_updates_pending), updatesSorted.size, true) val header = ExtensionGroupItem(context.getString(R.string.ext_updates_pending), updatesSorted.size, true)

View File

@ -7,7 +7,7 @@ import uy.kohesive.injekt.api.get
class SourcePreferencesPresenter( class SourcePreferencesPresenter(
val sourceId: Long, val sourceId: Long,
sourceManager: SourceManager = Injekt.get() sourceManager: SourceManager = Injekt.get(),
) : BasePresenter<SourcePreferencesController>() { ) : BasePresenter<SourcePreferencesController>() {
val source = sourceManager.get(sourceId) val source = sourceManager.get(sourceId)

View File

@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.databinding.SourceListItemBinding
class MigrationMangaHolder( class MigrationMangaHolder(
view: View, view: View,
private val adapter: MigrationMangaAdapter private val adapter: MigrationMangaAdapter,
) : FlexibleViewHolder(view, adapter) { ) : FlexibleViewHolder(view, adapter) {
private val binding = SourceListItemBinding.bind(view) private val binding = SourceListItemBinding.bind(view)

View File

@ -22,7 +22,7 @@ class MigrationMangaItem(val manga: Manga) : AbstractFlexibleItem<MigrationManga
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: MigrationMangaHolder, holder: MigrationMangaHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -10,7 +10,7 @@ import uy.kohesive.injekt.api.get
class MigrationMangaPresenter( class MigrationMangaPresenter(
private val sourceId: Long, private val sourceId: Long,
private val db: DatabaseHelper = Injekt.get() private val db: DatabaseHelper = Injekt.get(),
) : BasePresenter<MigrationMangaController>() { ) : BasePresenter<MigrationMangaController>() {
override fun onCreate(savedState: Bundle?) { override fun onCreate(savedState: Bundle?) {

View File

@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController
import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.injectLazy
class SearchController( class SearchController(
private var manga: Manga? = null private var manga: Manga? = null,
) : GlobalSearchController(manga?.title) { ) : GlobalSearchController(manga?.title) {
private var newManga: Manga? = null private var newManga: Manga? = null
@ -121,7 +121,7 @@ class SearchController(
} }
(targetController as? SearchController)?.migrateManga(manga, newManga) (targetController as? SearchController)?.migrateManga(manga, newManga)
} }
.setNegativeButton(R.string.copy) { _, _, -> .setNegativeButton(R.string.copy) { _, _ ->
if (callingController != null) { if (callingController != null) {
if (callingController.javaClass == SourceSearchController::class.java) { if (callingController.javaClass == SourceSearchController::class.java) {
router.popController(callingController) router.popController(callingController)

View File

@ -27,7 +27,7 @@ import java.util.Date
class SearchPresenter( class SearchPresenter(
initialQuery: String? = "", initialQuery: String? = "",
private val manga: Manga private val manga: Manga,
) : GlobalSearchPresenter(initialQuery) { ) : GlobalSearchPresenter(initialQuery) {
private val replacingMangaRelay = BehaviorRelay.create<Pair<Boolean, Manga?>>() private val replacingMangaRelay = BehaviorRelay.create<Pair<Boolean, Manga?>>()
@ -88,7 +88,7 @@ class SearchPresenter(
sourceChapters: List<SChapter>, sourceChapters: List<SChapter>,
prevManga: Manga, prevManga: Manga,
manga: Manga, manga: Manga,
replace: Boolean replace: Boolean,
) { ) {
val flags = preferences.migrateFlags().get() val flags = preferences.migrateFlags().get()
val migrateChapters = val migrateChapters =

View File

@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController
import eu.kanade.tachiyomi.ui.browse.source.browse.SourceItem import eu.kanade.tachiyomi.ui.browse.source.browse.SourceItem
class SourceSearchController( class SourceSearchController(
bundle: Bundle bundle: Bundle,
) : BrowseSourceController(bundle) { ) : BrowseSourceController(bundle) {
constructor(manga: Manga? = null, source: CatalogueSource, searchQuery: String? = null) : this( constructor(manga: Manga? = null, source: CatalogueSource, searchQuery: String? = null) : this(

View File

@ -20,7 +20,7 @@ import java.util.Locale
class MigrationSourcesPresenter( class MigrationSourcesPresenter(
private val sourceManager: SourceManager = Injekt.get(), private val sourceManager: SourceManager = Injekt.get(),
private val db: DatabaseHelper = Injekt.get() private val db: DatabaseHelper = Injekt.get(),
) : BasePresenter<MigrationSourcesController>() { ) : BasePresenter<MigrationSourcesController>() {
private val preferences: PreferencesHelper by injectLazy() private val preferences: PreferencesHelper by injectLazy()

View File

@ -38,7 +38,7 @@ class SelectionHeader : AbstractHeaderItem<SelectionHeader.Holder>() {
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: Holder, holder: Holder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
// Intentionally empty // Intentionally empty
} }

View File

@ -41,7 +41,7 @@ data class SourceItem(val source: Source, val mangaCount: Int, val header: Selec
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: SourceHolder, holder: SourceHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -35,7 +35,7 @@ data class LangItem(val code: String) : AbstractHeaderItem<LangHolder>() {
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: LangHolder, holder: LangHolder,
position: Int, position: Int,
payloads: MutableList<Any> payloads: MutableList<Any>,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.source.CatalogueSource
data class SourceItem( data class SourceItem(
val source: CatalogueSource, val source: CatalogueSource,
val header: LangItem? = null, val header: LangItem? = null,
val isPinned: Boolean = false val isPinned: Boolean = false,
) : ) :
AbstractSectionableItem<SourceHolder, LangItem>(header) { AbstractSectionableItem<SourceHolder, LangItem>(header) {
@ -33,7 +33,7 @@ data class SourceItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: SourceHolder, holder: SourceHolder,
position: Int, position: Int,
payloads: MutableList<Any> payloads: MutableList<Any>,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -21,7 +21,7 @@ import java.util.TreeMap
*/ */
class SourcePresenter( class SourcePresenter(
val sourceManager: SourceManager = Injekt.get(), val sourceManager: SourceManager = Injekt.get(),
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) : BasePresenter<SourceController>() { ) : BasePresenter<SourceController>() {
var sources = getEnabledSources() var sources = getEnabledSources()

View File

@ -62,7 +62,7 @@ open class BrowseSourcePresenter(
private val sourceManager: SourceManager = Injekt.get(), private val sourceManager: SourceManager = Injekt.get(),
private val db: DatabaseHelper = Injekt.get(), private val db: DatabaseHelper = Injekt.get(),
private val prefs: PreferencesHelper = Injekt.get(), private val prefs: PreferencesHelper = Injekt.get(),
private val coverCache: CoverCache = Injekt.get() private val coverCache: CoverCache = Injekt.get(),
) : BasePresenter<BrowseSourceController>() { ) : BasePresenter<BrowseSourceController>() {
/** /**

View File

@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
*/ */
class SourceComfortableGridHolder( class SourceComfortableGridHolder(
override val binding: SourceComfortableGridItemBinding, override val binding: SourceComfortableGridItemBinding,
adapter: FlexibleAdapter<*> adapter: FlexibleAdapter<*>,
) : SourceHolder<SourceComfortableGridItemBinding>(binding.root, adapter) { ) : SourceHolder<SourceComfortableGridItemBinding>(binding.root, adapter) {
/** /**

View File

@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
*/ */
class SourceCompactGridHolder( class SourceCompactGridHolder(
override val binding: SourceCompactGridItemBinding, override val binding: SourceCompactGridItemBinding,
adapter: FlexibleAdapter<*> adapter: FlexibleAdapter<*>,
) : SourceHolder<SourceCompactGridItemBinding>(binding.root, adapter) { ) : SourceHolder<SourceCompactGridItemBinding>(binding.root, adapter) {
/** /**

View File

@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.widget.sheet.BaseBottomSheetDialog
class SourceFilterSheet( class SourceFilterSheet(
activity: Activity, activity: Activity,
private val onFilterClicked: () -> Unit, private val onFilterClicked: () -> Unit,
private val onResetClicked: () -> Unit private val onResetClicked: () -> Unit,
) : BaseBottomSheetDialog(activity) { ) : BaseBottomSheetDialog(activity) {
private var filterNavView: FilterNavigationView = FilterNavigationView(activity) private var filterNavView: FilterNavigationView = FilterNavigationView(activity)
@ -36,7 +36,7 @@ class SourceFilterSheet(
class FilterNavigationView @JvmOverloads constructor( class FilterNavigationView @JvmOverloads constructor(
context: Context, context: Context,
attrs: AttributeSet? = null attrs: AttributeSet? = null,
) : ) :
SimpleNavigationView(context, attrs) { SimpleNavigationView(context, attrs) {

View File

@ -25,7 +25,7 @@ class SourceItem(val manga: Manga, private val displayMode: Preference<DisplayMo
override fun createViewHolder( override fun createViewHolder(
view: View, view: View,
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>> adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
): SourceHolder<*> { ): SourceHolder<*> {
return when (displayMode.get()) { return when (displayMode.get()) {
DisplayModeSetting.COMPACT_GRID, DisplayModeSetting.COVER_ONLY_GRID -> { DisplayModeSetting.COMPACT_GRID, DisplayModeSetting.COVER_ONLY_GRID -> {
@ -44,7 +44,7 @@ class SourceItem(val manga: Manga, private val displayMode: Preference<DisplayMo
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: SourceHolder<*>, holder: SourceHolder<*>,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.onSetValues(manga) holder.onSetValues(manga)
} }

View File

@ -22,7 +22,7 @@ class GlobalSearchCardItem(val manga: Manga) : AbstractFlexibleItem<GlobalSearch
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: GlobalSearchCardHolder, holder: GlobalSearchCardHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(manga) holder.bind(manga)
} }

View File

@ -28,7 +28,7 @@ import uy.kohesive.injekt.injectLazy
*/ */
open class GlobalSearchController( open class GlobalSearchController(
protected val initialQuery: String? = null, protected val initialQuery: String? = null,
protected val extensionFilter: String? = null protected val extensionFilter: String? = null,
) : SearchableNucleusController<GlobalSearchControllerBinding, GlobalSearchPresenter>(), ) : SearchableNucleusController<GlobalSearchControllerBinding, GlobalSearchPresenter>(),
GlobalSearchCardAdapter.OnMangaClickListener, GlobalSearchCardAdapter.OnMangaClickListener,
GlobalSearchAdapter.OnTitleClickListener { GlobalSearchAdapter.OnTitleClickListener {

View File

@ -43,7 +43,7 @@ class GlobalSearchItem(val source: CatalogueSource, val results: List<GlobalSear
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: GlobalSearchHolder, holder: GlobalSearchHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -39,7 +39,7 @@ open class GlobalSearchPresenter(
val initialExtensionFilter: String? = null, val initialExtensionFilter: String? = null,
val sourceManager: SourceManager = Injekt.get(), val sourceManager: SourceManager = Injekt.get(),
val db: DatabaseHelper = Injekt.get(), val db: DatabaseHelper = Injekt.get(),
val preferences: PreferencesHelper = Injekt.get() val preferences: PreferencesHelper = Injekt.get(),
) : BasePresenter<GlobalSearchController>() { ) : BasePresenter<GlobalSearchController>() {
/** /**

View File

@ -47,7 +47,7 @@ class CategoryItem(val category: Category) : AbstractFlexibleItem<CategoryHolder
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: CategoryHolder, holder: CategoryHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(category) holder.bind(category)
} }

View File

@ -13,7 +13,7 @@ import uy.kohesive.injekt.api.get
* Presenter of [CategoryController]. Used to manage the categories of the library. * Presenter of [CategoryController]. Used to manage the categories of the library.
*/ */
class CategoryPresenter( class CategoryPresenter(
private val db: DatabaseHelper = Injekt.get() private val db: DatabaseHelper = Injekt.get(),
) : BasePresenter<CategoryController>() { ) : BasePresenter<CategoryController>() {
/** /**

View File

@ -197,7 +197,9 @@ class DownloadController :
onUpdateDownloadedPages(download) onUpdateDownloadedPages(download)
} }
Download.State.ERROR -> unsubscribeProgress(download) Download.State.ERROR -> unsubscribeProgress(download)
else -> { /* unused */ } else -> {
/* unused */
}
} }
} }

View File

@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.R
data class DownloadHeaderItem( data class DownloadHeaderItem(
val id: Long, val id: Long,
val name: String, val name: String,
val size: Int val size: Int,
) : AbstractExpandableHeaderItem<DownloadHeaderHolder, DownloadItem>() { ) : AbstractExpandableHeaderItem<DownloadHeaderHolder, DownloadItem>() {
override fun getLayoutRes(): Int { override fun getLayoutRes(): Int {
@ -19,7 +19,7 @@ data class DownloadHeaderItem(
override fun createViewHolder( override fun createViewHolder(
view: View, view: View,
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>> adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
): DownloadHeaderHolder { ): DownloadHeaderHolder {
return DownloadHeaderHolder(view, adapter) return DownloadHeaderHolder(view, adapter)
} }
@ -28,7 +28,7 @@ data class DownloadHeaderItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: DownloadHeaderHolder, holder: DownloadHeaderHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this) holder.bind(this)
} }

View File

@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.data.download.model.Download
class DownloadItem( class DownloadItem(
val download: Download, val download: Download,
header: DownloadHeaderItem header: DownloadHeaderItem,
) : AbstractSectionableItem<DownloadHolder, DownloadHeaderItem>(header) { ) : AbstractSectionableItem<DownloadHolder, DownloadHeaderItem>(header) {
override fun getLayoutRes(): Int { override fun getLayoutRes(): Int {
@ -25,7 +25,7 @@ class DownloadItem(
*/ */
override fun createViewHolder( override fun createViewHolder(
view: View, view: View,
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>> adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
): DownloadHolder { ): DownloadHolder {
return DownloadHolder(view, adapter as DownloadAdapter) return DownloadHolder(view, adapter as DownloadAdapter)
} }
@ -42,7 +42,7 @@ class DownloadItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: DownloadHolder, holder: DownloadHolder,
position: Int, position: Int,
payloads: MutableList<Any> payloads: MutableList<Any>,
) { ) {
holder.bind(download) holder.bind(download)
} }

View File

@ -25,7 +25,7 @@ class ChangeMangaCategoriesDialog<T>(bundle: Bundle? = null) :
target: T, target: T,
mangas: List<Manga>, mangas: List<Manga>,
categories: List<Category>, categories: List<Category>,
preselected: Array<Int> preselected: Array<Int>,
) : this() { ) : this() {
this.mangas = mangas this.mangas = mangas
this.categories = categories this.categories = categories

View File

@ -24,7 +24,7 @@ class DeleteLibraryMangasDialog<T>(bundle: Bundle? = null) :
val items = when (canDeleteChapters) { val items = when (canDeleteChapters) {
true -> listOf( true -> listOf(
R.string.manga_from_library, R.string.manga_from_library,
R.string.downloaded_chapters, R.string.downloaded_chapters
) )
false -> listOf(R.string.manga_from_library) false -> listOf(R.string.manga_from_library)
} }

View File

@ -21,7 +21,7 @@ import uy.kohesive.injekt.api.get
*/ */
class LibraryAdapter( class LibraryAdapter(
private val controller: LibraryController, private val controller: LibraryController,
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) : RecyclerViewPagerAdapter() { ) : RecyclerViewPagerAdapter() {
/** /**

View File

@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
*/ */
class LibraryComfortableGridHolder( class LibraryComfortableGridHolder(
override val binding: SourceComfortableGridItemBinding, override val binding: SourceComfortableGridItemBinding,
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>> adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
) : LibraryHolder<SourceComfortableGridItemBinding>(binding.root, adapter) { ) : LibraryHolder<SourceComfortableGridItemBinding>(binding.root, adapter) {
/** /**

View File

@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.view.loadAutoPause
class LibraryCompactGridHolder( class LibraryCompactGridHolder(
override val binding: SourceCompactGridItemBinding, override val binding: SourceCompactGridItemBinding,
adapter: FlexibleAdapter<*>, adapter: FlexibleAdapter<*>,
private val coverOnly: Boolean private val coverOnly: Boolean,
) : LibraryHolder<SourceCompactGridItemBinding>(binding.root, adapter) { ) : LibraryHolder<SourceCompactGridItemBinding>(binding.root, adapter) {
/** /**

View File

@ -51,7 +51,7 @@ import java.util.concurrent.TimeUnit
class LibraryController( class LibraryController(
bundle: Bundle? = null, bundle: Bundle? = null,
private val preferences: PreferencesHelper = Injekt.get() private val preferences: PreferencesHelper = Injekt.get(),
) : SearchableNucleusController<LibraryControllerBinding, LibraryPresenter>(bundle), ) : SearchableNucleusController<LibraryControllerBinding, LibraryPresenter>(bundle),
RootController, RootController,
TabbedController, TabbedController,
@ -282,7 +282,7 @@ class LibraryController(
EmptyView.Action(R.string.getting_started_guide, R.drawable.ic_help_24dp) { EmptyView.Action(R.string.getting_started_guide, R.drawable.ic_help_24dp) {
activity?.openInBrowser("https://tachiyomi.org/help/guides/getting-started") activity?.openInBrowser("https://tachiyomi.org/help/guides/getting-started")
} }
), )
) )
(activity as? MainActivity)?.ready = true (activity as? MainActivity)?.ready = true
} }

View File

@ -14,7 +14,7 @@ import eu.davidea.viewholders.FlexibleViewHolder
abstract class LibraryHolder<VB : ViewBinding>( abstract class LibraryHolder<VB : ViewBinding>(
view: View, view: View,
adapter: FlexibleAdapter<*> adapter: FlexibleAdapter<*>,
) : FlexibleViewHolder(view, adapter) { ) : FlexibleViewHolder(view, adapter) {
abstract val binding: VB abstract val binding: VB

View File

@ -19,7 +19,7 @@ import uy.kohesive.injekt.api.get
class LibraryItem( class LibraryItem(
val manga: LibraryManga, val manga: LibraryManga,
private val shouldSetFromCategory: Preference<Boolean>, private val shouldSetFromCategory: Preference<Boolean>,
private val defaultLibraryDisplayMode: Preference<DisplayModeSetting> private val defaultLibraryDisplayMode: Preference<DisplayModeSetting>,
) : ) :
AbstractFlexibleItem<LibraryHolder<*>>(), IFilterable<String> { AbstractFlexibleItem<LibraryHolder<*>>(), IFilterable<String> {
@ -68,7 +68,7 @@ class LibraryItem(
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: LibraryHolder<*>, holder: LibraryHolder<*>,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.onSetValues(this) holder.onSetValues(this)
} }

View File

@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.databinding.SourceListItemBinding
*/ */
class LibraryListHolder( class LibraryListHolder(
private val view: View, private val view: View,
private val adapter: FlexibleAdapter<*> private val adapter: FlexibleAdapter<*>,
) : LibraryHolder<SourceListItemBinding>(view, adapter) { ) : LibraryHolder<SourceListItemBinding>(view, adapter) {
override val binding = SourceListItemBinding.bind(view) override val binding = SourceListItemBinding.bind(view)

View File

@ -53,7 +53,7 @@ class LibraryPresenter(
private val coverCache: CoverCache = Injekt.get(), private val coverCache: CoverCache = Injekt.get(),
private val sourceManager: SourceManager = Injekt.get(), private val sourceManager: SourceManager = Injekt.get(),
private val downloadManager: DownloadManager = Injekt.get(), private val downloadManager: DownloadManager = Injekt.get(),
private val trackManager: TrackManager = Injekt.get() private val trackManager: TrackManager = Injekt.get(),
) : BasePresenter<LibraryController>() { ) : BasePresenter<LibraryController>() {
private val context = preferences.context private val context = preferences.context

View File

@ -23,7 +23,7 @@ import uy.kohesive.injekt.injectLazy
class LibrarySettingsSheet( class LibrarySettingsSheet(
router: Router, router: Router,
private val trackManager: TrackManager = Injekt.get(), private val trackManager: TrackManager = Injekt.get(),
onGroupClickListener: (ExtendedNavigationView.Group) -> Unit onGroupClickListener: (ExtendedNavigationView.Group) -> Unit,
) : TabbedBottomSheetDialog(router.activity!!) { ) : TabbedBottomSheetDialog(router.activity!!) {
val filters: Filter val filters: Filter

View File

@ -204,7 +204,7 @@ class MainActivity : BaseActivity() {
from: Controller?, from: Controller?,
isPush: Boolean, isPush: Boolean,
container: ViewGroup, container: ViewGroup,
handler: ControllerChangeHandler handler: ControllerChangeHandler,
) { ) {
syncActivityViewWithController(to, from, isPush) syncActivityViewWithController(to, from, isPush)
} }
@ -214,7 +214,7 @@ class MainActivity : BaseActivity() {
from: Controller?, from: Controller?,
isPush: Boolean, isPush: Boolean,
container: ViewGroup, container: ViewGroup,
handler: ControllerChangeHandler handler: ControllerChangeHandler,
) { ) {
} }
} }

View File

@ -425,7 +425,7 @@ class MangaController :
when (item.itemId) { when (item.itemId) {
R.id.action_share -> shareManga() R.id.action_share -> shareManga()
R.id.download_next, R.id.download_next_5, R.id.download_next_10, 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) -> downloadChapters(item.itemId)
R.id.action_edit_categories -> onCategoriesClick() R.id.action_edit_categories -> onCategoriesClick()
@ -532,7 +532,7 @@ class MangaController :
if (duplicateManga != null) { if (duplicateManga != null) {
showAddDuplicateDialog( showAddDuplicateDialog(
manga, manga,
duplicateManga, duplicateManga
) )
} else { } else {
addToLibrary(manga) addToLibrary(manga)
@ -545,11 +545,11 @@ class MangaController :
val source = sourceManager.getOrStub(libraryManga.source) val source = sourceManager.getOrStub(libraryManga.source)
MaterialAlertDialogBuilder(it).apply { MaterialAlertDialogBuilder(it).apply {
setMessage(activity?.getString(R.string.confirm_manga_add_duplicate, source.name)) 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) addToLibrary(newManga)
} }
setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _, -> } setNegativeButton(activity?.getString(R.string.action_cancel)) { _, _ -> }
setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _, -> setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _ ->
router.pushController(MangaController(libraryManga).withFadeTransaction()) router.pushController(MangaController(libraryManga).withFadeTransaction())
} }
setCancelable(true) setCancelable(true)
@ -703,7 +703,7 @@ class MangaController :
previousController.search(query) previousController.search(query)
} }
is UpdatesController, is UpdatesController,
is HistoryController -> { is HistoryController, -> {
// Manually navigate to LibraryController // Manually navigate to LibraryController
router.handleBack() router.handleBack()
(router.activity as MainActivity).setSelectedNavItem(R.id.nav_library) (router.activity as MainActivity).setSelectedNavItem(R.id.nav_library)
@ -960,7 +960,7 @@ class MangaController :
intent.apply { intent.apply {
putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true) putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true)
}, },
activityOptions.toBundle(), activityOptions.toBundle()
) )
} else { } else {
startActivity(intent) startActivity(intent)

View File

@ -66,7 +66,7 @@ class MangaPresenter(
private val db: DatabaseHelper = Injekt.get(), private val db: DatabaseHelper = Injekt.get(),
private val trackManager: TrackManager = Injekt.get(), private val trackManager: TrackManager = Injekt.get(),
private val downloadManager: DownloadManager = Injekt.get(), private val downloadManager: DownloadManager = Injekt.get(),
private val coverCache: CoverCache = Injekt.get() private val coverCache: CoverCache = Injekt.get(),
) : BasePresenter<MangaController>() { ) : BasePresenter<MangaController>() {
/** /**

View File

@ -15,7 +15,7 @@ import java.util.Date
class ChapterHolder( class ChapterHolder(
view: View, view: View,
private val adapter: ChaptersAdapter private val adapter: ChaptersAdapter,
) : BaseChapterHolder(view, adapter) { ) : BaseChapterHolder(view, adapter) {
private val binding = ChaptersItemBinding.bind(view) private val binding = ChaptersItemBinding.bind(view)

View File

@ -26,7 +26,7 @@ class ChapterItem(chapter: Chapter, val manga: Manga) :
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>,
holder: ChapterHolder, holder: ChapterHolder,
position: Int, position: Int,
payloads: List<Any?>? payloads: List<Any?>?,
) { ) {
holder.bind(this, manga) holder.bind(this, manga)
} }

View File

@ -13,7 +13,7 @@ import java.text.DecimalFormatSymbols
class ChaptersAdapter( class ChaptersAdapter(
controller: MangaController, controller: MangaController,
context: Context context: Context,
) : BaseChaptersAdapter<ChapterItem>(controller) { ) : BaseChaptersAdapter<ChapterItem>(controller) {
private val preferences: PreferencesHelper by injectLazy() private val preferences: PreferencesHelper by injectLazy()

View File

@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog
class ChaptersSettingsSheet( class ChaptersSettingsSheet(
private val router: Router, private val router: Router,
private val presenter: MangaPresenter, private val presenter: MangaPresenter,
private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit private val onGroupClickListener: (ExtendedNavigationView.Group) -> Unit,
) : TabbedBottomSheetDialog(router.activity!!) { ) : TabbedBottomSheetDialog(router.activity!!) {
val filters = Filter(router.activity!!) val filters = Filter(router.activity!!)

View File

@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.onEach
import reactivecircus.flowbinding.android.view.clicks import reactivecircus.flowbinding.android.view.clicks
class MangaChaptersHeaderAdapter( class MangaChaptersHeaderAdapter(
private val controller: MangaController private val controller: MangaController,
) : ) :
RecyclerView.Adapter<MangaChaptersHeaderAdapter.HeaderViewHolder>() { RecyclerView.Adapter<MangaChaptersHeaderAdapter.HeaderViewHolder>() {

Some files were not shown because too many files have changed in this diff Show More