Update parsers
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
|||||||
applicationId 'org.koitharu.kotatsu'
|
applicationId 'org.koitharu.kotatsu'
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 596
|
versionCode = 597
|
||||||
versionName = '6.3.0-a1'
|
versionName = '6.3.0'
|
||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner "org.koitharu.kotatsu.HiltTestRunner"
|
testInstrumentationRunner "org.koitharu.kotatsu.HiltTestRunner"
|
||||||
ksp {
|
ksp {
|
||||||
@@ -33,7 +33,6 @@ android {
|
|||||||
applicationIdSuffix = '.debug'
|
applicationIdSuffix = '.debug'
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
multiDexEnabled false
|
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
@@ -82,7 +81,7 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
implementation('com.github.KotatsuApp:kotatsu-parsers:2cd2d7dbc4') {
|
implementation('com.github.KotatsuApp:kotatsu-parsers:43fd7b8d47') {
|
||||||
exclude group: 'org.json', module: 'json'
|
exclude group: 'org.json', module: 'json'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +90,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'androidx.core:core-ktx:1.12.0'
|
implementation 'androidx.core:core-ktx:1.12.0'
|
||||||
implementation 'androidx.activity:activity-ktx:1.8.0'
|
implementation 'androidx.activity:activity-ktx:1.8.1'
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.6.2'
|
implementation 'androidx.fragment:fragment-ktx:1.6.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
|
||||||
|
|||||||
@@ -307,15 +307,13 @@ class ReaderActivity :
|
|||||||
private fun onPageSaved(uri: Uri?) {
|
private fun onPageSaved(uri: Uri?) {
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
Snackbar.make(viewBinding.container, R.string.page_saved, Snackbar.LENGTH_LONG)
|
Snackbar.make(viewBinding.container, R.string.page_saved, Snackbar.LENGTH_LONG)
|
||||||
.setAnchorView(viewBinding.appbarBottom)
|
|
||||||
.setAction(R.string.share) {
|
.setAction(R.string.share) {
|
||||||
ShareHelper(this).shareImage(uri)
|
ShareHelper(this).shareImage(uri)
|
||||||
}.show()
|
}
|
||||||
} else {
|
} else {
|
||||||
Snackbar.make(viewBinding.container, R.string.error_occurred, Snackbar.LENGTH_SHORT)
|
Snackbar.make(viewBinding.container, R.string.error_occurred, Snackbar.LENGTH_SHORT)
|
||||||
.setAnchorView(viewBinding.appbarBottom)
|
}.setAnchorView(viewBinding.appbarBottom)
|
||||||
.show()
|
.show()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setWindowSecure(isSecure: Boolean) {
|
private fun setWindowSecure(isSecure: Boolean) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import kotlinx.coroutines.flow.onEach
|
|||||||
import kotlinx.coroutines.flow.stateIn
|
import kotlinx.coroutines.flow.stateIn
|
||||||
import kotlinx.coroutines.flow.update
|
import kotlinx.coroutines.flow.update
|
||||||
import kotlinx.coroutines.plus
|
import kotlinx.coroutines.plus
|
||||||
|
import org.koitharu.kotatsu.BuildConfig
|
||||||
import org.koitharu.kotatsu.R
|
import org.koitharu.kotatsu.R
|
||||||
import org.koitharu.kotatsu.bookmarks.domain.Bookmark
|
import org.koitharu.kotatsu.bookmarks.domain.Bookmark
|
||||||
import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository
|
import org.koitharu.kotatsu.bookmarks.domain.BookmarksRepository
|
||||||
@@ -255,10 +256,13 @@ class ReaderViewModel @Inject constructor(
|
|||||||
@MainThread
|
@MainThread
|
||||||
fun onCurrentPageChanged(position: Int) {
|
fun onCurrentPageChanged(position: Int) {
|
||||||
val prevJob = stateChangeJob
|
val prevJob = stateChangeJob
|
||||||
|
val pages = content.value.pages // capture immediately
|
||||||
stateChangeJob = launchJob(Dispatchers.Default) {
|
stateChangeJob = launchJob(Dispatchers.Default) {
|
||||||
prevJob?.cancelAndJoin()
|
prevJob?.cancelAndJoin()
|
||||||
loadingJob?.join()
|
loadingJob?.join()
|
||||||
val pages = content.value.pages
|
if (BuildConfig.DEBUG && pages.size != content.value.pages.size) {
|
||||||
|
throw IllegalStateException("Concurrent pages modification")
|
||||||
|
}
|
||||||
pages.getOrNull(position)?.let { page ->
|
pages.getOrNull(position)?.let { page ->
|
||||||
currentState.update { cs ->
|
currentState.update { cs ->
|
||||||
cs?.copy(chapterId = page.chapterId, page = page.index)
|
cs?.copy(chapterId = page.chapterId, page = page.index)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.1.3'
|
classpath 'com.android.tools.build:gradle:8.1.4'
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20'
|
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20'
|
||||||
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.48.1'
|
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.48.1'
|
||||||
classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.20-1.0.14'
|
classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.20-1.0.14'
|
||||||
|
|||||||
Reference in New Issue
Block a user