fix compile warnings

This commit is contained in:
Aria Moradi
2021-08-17 23:52:34 +04:30
parent fcdda6406e
commit a5578a7ac7
17 changed files with 39 additions and 28 deletions

View File

@@ -47,7 +47,7 @@ object Category {
/**
* Move the category from position `from` to `to`
*/
fun reorderCategory(categoryId: Int, from: Int, to: Int) {
fun reorderCategory(from: Int, to: Int) {
transaction {
val categories = CategoryTable.selectAll().orderBy(CategoryTable.order to SortOrder.ASC).toMutableList()
categories.add(to - 1, categories.removeAt(from - 1))

View File

@@ -20,15 +20,18 @@ object Search {
}
// TODO
@Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE")
fun sourceFilters(sourceId: Long) {
val source = getHttpSource(sourceId)
// source.getFilterList().toItems()
}
@Suppress("UNUSED_PARAMETER")
fun sourceGlobalSearch(searchTerm: String) {
// TODO
}
@Suppress("unused")
data class FilterWrapper(
val type: String,
val filter: Any

View File

@@ -141,6 +141,7 @@ object LegacyBackupImport : LegacyBackupBase() {
* @param history history data from json
* @param tracks tracking data from json
*/
@Suppress("UNUSED_PARAMETER")
private suspend fun restoreMangaData(
manga: Manga,
source: Source,
@@ -204,6 +205,7 @@ object LegacyBackupImport : LegacyBackupBase() {
return fetchedManga
}
@Suppress("UNUSED_PARAMETER") // TODO: remove this suppress when update Chapters is written
private fun updateChapters(source: Source, fetchedManga: SManga, chapters: List<Chapter>) {
// TODO("Not yet implemented")
}

View File

@@ -42,11 +42,11 @@ object LegacyBackupValidator {
.sorted()
}
val trackers = mangas
.filter { it.asJsonObject.has("track") }
.flatMap { it.asJsonObject["track"].asJsonArray }
.map { it.asJsonObject["s"].asInt }
.distinct()
// val trackers = mangas
// .filter { it.asJsonObject.has("track") }
// .flatMap { it.asJsonObject["track"].asJsonArray }
// .map { it.asJsonObject["s"].asInt }
// .distinct()
val missingTrackers = listOf("")
// val missingTrackers = trackers

View File

@@ -85,7 +85,7 @@ object BytecodeEditor {
bytes[2],
bytes[3]
)
if (cafebabe.toLowerCase() != "cafebabe") {
if (cafebabe.lowercase() != "cafebabe") {
// Corrupted class
return@use null
}