Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a26587250 | ||
|
|
bb68869fe1 | ||
|
|
e60ca7115a | ||
|
|
e03a200c32 | ||
|
|
8713faa487 |
@@ -18,8 +18,8 @@ android {
|
|||||||
applicationId 'org.koitharu.kotatsu'
|
applicationId 'org.koitharu.kotatsu'
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 700
|
versionCode = 702
|
||||||
versionName = '7.7.8'
|
versionName = '7.7.10'
|
||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner'
|
testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner'
|
||||||
ksp {
|
ksp {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.koitharu.kotatsu.core.ui.list.fastscroll.FastScroller
|
|||||||
import org.koitharu.kotatsu.list.ui.adapter.ListHeaderClickListener
|
import org.koitharu.kotatsu.list.ui.adapter.ListHeaderClickListener
|
||||||
import org.koitharu.kotatsu.list.ui.adapter.ListItemType
|
import org.koitharu.kotatsu.list.ui.adapter.ListItemType
|
||||||
import org.koitharu.kotatsu.list.ui.adapter.emptyStateListAD
|
import org.koitharu.kotatsu.list.ui.adapter.emptyStateListAD
|
||||||
|
import org.koitharu.kotatsu.list.ui.adapter.errorStateListAD
|
||||||
import org.koitharu.kotatsu.list.ui.adapter.listHeaderAD
|
import org.koitharu.kotatsu.list.ui.adapter.listHeaderAD
|
||||||
import org.koitharu.kotatsu.list.ui.adapter.loadingFooterAD
|
import org.koitharu.kotatsu.list.ui.adapter.loadingFooterAD
|
||||||
import org.koitharu.kotatsu.list.ui.adapter.loadingStateAD
|
import org.koitharu.kotatsu.list.ui.adapter.loadingStateAD
|
||||||
@@ -25,6 +26,7 @@ class BookmarksAdapter(
|
|||||||
init {
|
init {
|
||||||
addDelegate(ListItemType.PAGE_THUMB, bookmarkLargeAD(coil, lifecycleOwner, clickListener))
|
addDelegate(ListItemType.PAGE_THUMB, bookmarkLargeAD(coil, lifecycleOwner, clickListener))
|
||||||
addDelegate(ListItemType.HEADER, listHeaderAD(headerClickListener))
|
addDelegate(ListItemType.HEADER, listHeaderAD(headerClickListener))
|
||||||
|
addDelegate(ListItemType.STATE_ERROR, errorStateListAD(null))
|
||||||
addDelegate(ListItemType.FOOTER_LOADING, loadingFooterAD())
|
addDelegate(ListItemType.FOOTER_LOADING, loadingFooterAD())
|
||||||
addDelegate(ListItemType.STATE_LOADING, loadingStateAD())
|
addDelegate(ListItemType.STATE_LOADING, loadingStateAD())
|
||||||
addDelegate(ListItemType.STATE_EMPTY, emptyStateListAD(coil, lifecycleOwner, null))
|
addDelegate(ListItemType.STATE_EMPTY, emptyStateListAD(coil, lifecycleOwner, null))
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.koitharu.kotatsu.core.db.migrations.Migration1To2
|
|||||||
import org.koitharu.kotatsu.core.db.migrations.Migration20To21
|
import org.koitharu.kotatsu.core.db.migrations.Migration20To21
|
||||||
import org.koitharu.kotatsu.core.db.migrations.Migration21To22
|
import org.koitharu.kotatsu.core.db.migrations.Migration21To22
|
||||||
import org.koitharu.kotatsu.core.db.migrations.Migration22To23
|
import org.koitharu.kotatsu.core.db.migrations.Migration22To23
|
||||||
|
import org.koitharu.kotatsu.core.db.migrations.Migration24To23
|
||||||
import org.koitharu.kotatsu.core.db.migrations.Migration2To3
|
import org.koitharu.kotatsu.core.db.migrations.Migration2To3
|
||||||
import org.koitharu.kotatsu.core.db.migrations.Migration3To4
|
import org.koitharu.kotatsu.core.db.migrations.Migration3To4
|
||||||
import org.koitharu.kotatsu.core.db.migrations.Migration4To5
|
import org.koitharu.kotatsu.core.db.migrations.Migration4To5
|
||||||
@@ -128,6 +129,7 @@ fun getDatabaseMigrations(context: Context): Array<Migration> = arrayOf(
|
|||||||
Migration20To21(),
|
Migration20To21(),
|
||||||
Migration21To22(),
|
Migration21To22(),
|
||||||
Migration22To23(),
|
Migration22To23(),
|
||||||
|
Migration24To23(),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun MangaDatabase(context: Context): MangaDatabase = Room
|
fun MangaDatabase(context: Context): MangaDatabase = Room
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package org.koitharu.kotatsu.core.db.migrations
|
||||||
|
|
||||||
|
import androidx.room.migration.Migration
|
||||||
|
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||||
|
|
||||||
|
class Migration24To23 : Migration(24, 23) {
|
||||||
|
|
||||||
|
override fun migrate(db: SupportSQLiteDatabase) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS `chapters`")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,7 +62,7 @@ class LocalMangaParser(private val uri: Uri) {
|
|||||||
mangaInfo.copy(
|
mangaInfo.copy(
|
||||||
source = LocalMangaSource,
|
source = LocalMangaSource,
|
||||||
url = rootFile.toUri().toString(),
|
url = rootFile.toUri().toString(),
|
||||||
coverUrl = coverEntry?.let { uri.child(it, resolve = true).toString() }.orEmpty(),
|
coverUrl = coverEntry?.let { uri.child(it, resolve = true).toString() },
|
||||||
largeCoverUrl = null,
|
largeCoverUrl = null,
|
||||||
chapters = if (withDetails) {
|
chapters = if (withDetails) {
|
||||||
mangaInfo.chapters?.mapNotNull { c ->
|
mangaInfo.chapters?.mapNotNull { c ->
|
||||||
@@ -92,9 +92,7 @@ class LocalMangaParser(private val uri: Uri) {
|
|||||||
url = rootFile.toUri().toString(),
|
url = rootFile.toUri().toString(),
|
||||||
publicUrl = rootFile.toUri().toString(),
|
publicUrl = rootFile.toUri().toString(),
|
||||||
source = LocalMangaSource,
|
source = LocalMangaSource,
|
||||||
coverUrl = coverEntry?.let {
|
coverUrl = coverEntry?.let { uri.child(it, resolve = true).toString() },
|
||||||
uri.child(it, resolve = true).toString()
|
|
||||||
}.orEmpty(),
|
|
||||||
chapters = if (withDetails) {
|
chapters = if (withDetails) {
|
||||||
val chapters = fileSystem.listRecursively(rootPath)
|
val chapters = fileSystem.listRecursively(rootPath)
|
||||||
.mapNotNullTo(HashSet()) { path ->
|
.mapNotNullTo(HashSet()) { path ->
|
||||||
|
|||||||
@@ -41,10 +41,12 @@ private fun PreferenceFragmentCompat.addPreferencesFromParserRepository(reposito
|
|||||||
}
|
}
|
||||||
}.apply {
|
}.apply {
|
||||||
summaryProvider = EditTextDefaultSummaryProvider(key.defaultValue)
|
summaryProvider = EditTextDefaultSummaryProvider(key.defaultValue)
|
||||||
onBindEditTextListener = EditTextBindListener(
|
setOnBindEditTextListener(
|
||||||
inputType = EditorInfo.TYPE_CLASS_TEXT or EditorInfo.TYPE_TEXT_VARIATION_URI,
|
EditTextBindListener(
|
||||||
hint = key.defaultValue,
|
inputType = EditorInfo.TYPE_CLASS_TEXT or EditorInfo.TYPE_TEXT_VARIATION_URI,
|
||||||
validator = DomainValidator(),
|
hint = key.defaultValue,
|
||||||
|
validator = DomainValidator(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
setTitle(R.string.domain)
|
setTitle(R.string.domain)
|
||||||
setDialogTitle(R.string.domain)
|
setDialogTitle(R.string.domain)
|
||||||
@@ -60,10 +62,12 @@ private fun PreferenceFragmentCompat.addPreferencesFromParserRepository(reposito
|
|||||||
UserAgents.CHROME_DESKTOP,
|
UserAgents.CHROME_DESKTOP,
|
||||||
)
|
)
|
||||||
summaryProvider = EditTextDefaultSummaryProvider(key.defaultValue)
|
summaryProvider = EditTextDefaultSummaryProvider(key.defaultValue)
|
||||||
onBindEditTextListener = EditTextBindListener(
|
setOnBindEditTextListener(
|
||||||
inputType = EditorInfo.TYPE_CLASS_TEXT,
|
EditTextBindListener(
|
||||||
hint = key.defaultValue,
|
inputType = EditorInfo.TYPE_CLASS_TEXT,
|
||||||
validator = HeaderValidator(),
|
hint = key.defaultValue,
|
||||||
|
validator = HeaderValidator(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
setTitle(R.string.user_agent)
|
setTitle(R.string.user_agent)
|
||||||
setDialogTitle(R.string.user_agent)
|
setDialogTitle(R.string.user_agent)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ material = "1.12.0"
|
|||||||
moshi = "1.15.2"
|
moshi = "1.15.2"
|
||||||
okhttp = "4.12.0"
|
okhttp = "4.12.0"
|
||||||
okio = "3.9.1"
|
okio = "3.9.1"
|
||||||
parsers = "51ed1b2db8"
|
parsers = "794a737b6d"
|
||||||
preference = "1.2.1"
|
preference = "1.2.1"
|
||||||
recyclerview = "1.3.2"
|
recyclerview = "1.3.2"
|
||||||
room = "2.6.1"
|
room = "2.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user