Update dependencies
This commit is contained in:
@@ -76,8 +76,9 @@ android {
|
||||
'-opt-in=kotlin.contracts.ExperimentalContracts',
|
||||
'-opt-in=coil3.annotation.ExperimentalCoilApi',
|
||||
'-opt-in=coil3.annotation.InternalCoilApi',
|
||||
'-opt-in=org.koitharu.kotatsu.parsers.InternalParsersApi',
|
||||
'-Xjspecify-annotations=strict',
|
||||
'-Xtype-enhancement-improvements-strict-mode',
|
||||
'-Xtype-enhancement-improvements-strict-mode'
|
||||
]
|
||||
}
|
||||
room {
|
||||
@@ -104,13 +105,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
afterEvaluate {
|
||||
compileDebugKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += ['-opt-in=org.koitharu.kotatsu.parsers.InternalParsersApi']
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
def parsersVersion = libs.versions.parsers.get()
|
||||
if (System.properties.containsKey('parsersVersionOverride')) {
|
||||
@@ -138,6 +132,7 @@ dependencies {
|
||||
implementation libs.lifecycle.service
|
||||
implementation libs.lifecycle.process
|
||||
implementation libs.androidx.constraintlayout
|
||||
implementation libs.androidx.documentfile
|
||||
implementation libs.androidx.swiperefreshlayout
|
||||
implementation libs.androidx.recyclerview
|
||||
implementation libs.androidx.viewpager2
|
||||
|
||||
@@ -52,7 +52,7 @@ abstract class FavouriteCategoriesDao {
|
||||
@Query("SELECT MAX(sort_key) FROM favourite_categories WHERE deleted_at = 0")
|
||||
protected abstract suspend fun getMaxSortKey(): Int?
|
||||
|
||||
@SuppressWarnings(RoomWarnings.CURSOR_MISMATCH) // for the new_chapters column
|
||||
@SuppressWarnings(RoomWarnings.QUERY_MISMATCH) // for the new_chapters column
|
||||
@Query("SELECT favourite_categories.*, (SELECT SUM(chapters_new) FROM tracks WHERE tracks.manga_id IN (SELECT manga_id FROM favourites WHERE favourites.category_id = favourite_categories.category_id)) AS new_chapters FROM favourite_categories WHERE track = 1 AND show_in_lib = 1 AND deleted_at = 0 AND new_chapters > 0 ORDER BY new_chapters DESC LIMIT :limit")
|
||||
abstract suspend fun getMostUpdatedCategories(limit: Int): List<FavouriteCategoryEntity>
|
||||
|
||||
|
||||
@@ -10,11 +10,14 @@ import android.view.WindowManager
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.TextView
|
||||
import androidx.activity.viewModels
|
||||
import androidx.biometric.AuthenticationRequest
|
||||
import androidx.biometric.AuthenticationRequest.Biometric
|
||||
import androidx.biometric.AuthenticationResult
|
||||
import androidx.biometric.AuthenticationResultCallback
|
||||
import androidx.biometric.BiometricManager
|
||||
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK
|
||||
import androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS
|
||||
import androidx.biometric.BiometricPrompt
|
||||
import androidx.biometric.BiometricPrompt.AuthenticationCallback
|
||||
import androidx.biometric.registerForAuthenticationResult
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
@@ -35,11 +38,14 @@ class ProtectActivity :
|
||||
BaseActivity<ActivityProtectBinding>(),
|
||||
TextView.OnEditorActionListener,
|
||||
DefaultTextWatcher,
|
||||
View.OnClickListener {
|
||||
View.OnClickListener,
|
||||
AuthenticationResultCallback {
|
||||
|
||||
private val viewModel by viewModels<ProtectViewModel>()
|
||||
private var canUseBiometric = false
|
||||
|
||||
private val biometricPrompt = registerForAuthenticationResult(resultCallback = this)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
@@ -108,6 +114,12 @@ class ProtectActivity :
|
||||
updateEndIcon()
|
||||
}
|
||||
|
||||
override fun onAuthResult(result: AuthenticationResult) {
|
||||
if (result.isSuccess()) {
|
||||
viewModel.unlock()
|
||||
}
|
||||
}
|
||||
|
||||
private fun onError(e: Throwable) {
|
||||
viewBinding.layoutPassword.error = e.getDisplayMessage(resources)
|
||||
}
|
||||
@@ -123,14 +135,15 @@ class ProtectActivity :
|
||||
if (BiometricManager.from(this).canAuthenticate(BIOMETRIC_WEAK) != BIOMETRIC_SUCCESS) {
|
||||
return false
|
||||
}
|
||||
val prompt = BiometricPrompt(this, BiometricCallback())
|
||||
val promptInfo = BiometricPrompt.PromptInfo.Builder()
|
||||
.setAllowedAuthenticators(BIOMETRIC_WEAK)
|
||||
.setTitle(getString(R.string.app_name))
|
||||
.setConfirmationRequired(false)
|
||||
.setNegativeButtonText(getString(android.R.string.cancel))
|
||||
.build()
|
||||
prompt.authenticate(promptInfo)
|
||||
val request = AuthenticationRequest.biometricRequest(
|
||||
title = getString(R.string.app_name),
|
||||
authFallback = Biometric.Fallback.NegativeButton(getString(android.R.string.cancel)),
|
||||
init = {
|
||||
setMinStrength(Biometric.Strength.Class2)
|
||||
setIsConfirmationRequired(false)
|
||||
},
|
||||
)
|
||||
biometricPrompt.launch(request)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -152,13 +165,6 @@ class ProtectActivity :
|
||||
}
|
||||
}
|
||||
|
||||
private inner class BiometricCallback : AuthenticationCallback() {
|
||||
override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
|
||||
super.onAuthenticationSucceeded(result)
|
||||
viewModel.unlock()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private const val EXTRA_INTENT = "src_intent"
|
||||
|
||||
@@ -11,7 +11,6 @@ import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.ViewGroup.MarginLayoutParams
|
||||
import android.widget.TextView
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
@@ -120,6 +119,7 @@ class AppUpdateActivity : BaseActivity<ActivityAppUpdateBinding>(), View.OnClick
|
||||
viewBinding.textViewContent.setText(R.string.loading_)
|
||||
return
|
||||
}
|
||||
val markwon = Markwon.create(this)
|
||||
val message = withContext(Dispatchers.Default) {
|
||||
buildSpannedString {
|
||||
append(getString(R.string.new_version_s, version.name))
|
||||
@@ -127,10 +127,10 @@ class AppUpdateActivity : BaseActivity<ActivityAppUpdateBinding>(), View.OnClick
|
||||
append(getString(R.string.size_s, FileSize.BYTES.format(this@AppUpdateActivity, version.apkSize)))
|
||||
appendLine()
|
||||
appendLine()
|
||||
append(Markwon.create(this@AppUpdateActivity).toMarkdown(version.description))
|
||||
append(markwon.toMarkdown(version.description))
|
||||
}
|
||||
}
|
||||
viewBinding.textViewContent.setText(message, TextView.BufferType.SPANNABLE)
|
||||
markwon.setParsedMarkdown(viewBinding.textViewContent, message)
|
||||
}
|
||||
|
||||
private fun doUpdate() {
|
||||
|
||||
@@ -84,17 +84,64 @@
|
||||
|
||||
<!-- Expressive Monet theme -->
|
||||
<style name="ThemeOverlay.Kotatsu.Expressive" parent="ThemeOverlay.Material3Expressive.DynamicColors.DayNight">
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.Material3Expressive.Dialog.Alert</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3Expressive.MaterialAlertDialog</item>
|
||||
|
||||
<item name="appBarLayoutStyle">@style/Widget.Material3Expressive.AppBarLayout</item>
|
||||
<item name="collapsingToolbarLayoutStyle">@style/Widget.Material3Expressive.CollapsingToolbar</item>
|
||||
<item name="collapsingToolbarLayoutMediumStyle">@style/Widget.Material3Expressive.CollapsingToolbar.Medium
|
||||
</item>
|
||||
<item name="collapsingToolbarLayoutLargeStyle">@style/Widget.Material3Expressive.CollapsingToolbar.Large</item>
|
||||
|
||||
<item name="materialSearchBarStyle">@style/Widget.Material3Expressive.SearchBar</item>
|
||||
|
||||
<item name="floatingActionButtonStyle">@style/Widget.Material3Expressive.FloatingActionButton</item>
|
||||
<item name="floatingActionButtonMediumStyle">@style/Widget.Material3Expressive.FloatingActionButton.Medium
|
||||
</item>
|
||||
<item name="floatingActionButtonLargeStyle">@style/Widget.Material3Expressive.FloatingActionButton.Large</item>
|
||||
|
||||
<item name="extendedFloatingActionButtonSmallStyle">
|
||||
@style/Widget.Material3Expressive.ExtendedFloatingActionButton.Small
|
||||
</item>
|
||||
<item name="extendedFloatingActionButtonMediumStyle">
|
||||
@style/Widget.Material3Expressive.ExtendedFloatingActionButton.Medium
|
||||
</item>
|
||||
<item name="extendedFloatingActionButtonLargeStyle">
|
||||
@style/Widget.Material3Expressive.ExtendedFloatingActionButton.Large
|
||||
</item>
|
||||
|
||||
<item name="materialButtonStyle">@style/Widget.Material3Expressive.Button</item>
|
||||
<item name="materialButtonOutlinedStyle">@style/Widget.Material3Expressive.Button.OutlinedButton</item>
|
||||
<item name="materialButtonTonalStyle">@style/Widget.Material3Expressive.Button.TonalButton</item>
|
||||
<item name="borderlessButtonStyle">@style/Widget.Material3Expressive.Button.TextButton</item>
|
||||
<item name="materialButtonOutlinedStyle">@style/Widget.Material3Expressive.Button.OutlinedButton</item>
|
||||
<item name="materialButtonElevatedStyle">@style/Widget.Material3Expressive.Button.ElevatedButton</item>
|
||||
<item name="borderlessButtonStyle">@style/Widget.Material3Expressive.Button.TextButton</item>
|
||||
<item name="buttonBarButtonStyle">@style/Widget.Material3Expressive.Button.TextButton.Dialog</item>
|
||||
<item name="snackbarButtonStyle">@style/Widget.Material3Expressive.Button.TextButton.Snackbar</item>
|
||||
<item name="materialIconButtonStyle">@style/Widget.Material3Expressive.Button.IconButton.Standard</item>
|
||||
<item name="materialIconButtonOutlinedStyle">@style/Widget.Material3Expressive.Button.IconButton.Outlined</item>
|
||||
<item name="materialIconButtonFilledStyle">@style/Widget.Material3Expressive.Button.IconButton.Filled</item>
|
||||
<item name="materialIconButtonFilledTonalStyle">@style/Widget.Material3Expressive.Button.IconButton.Tonal</item>
|
||||
<item name="materialIconButtonOutlinedStyle">@style/Widget.Material3Expressive.Button.IconButton.Outlined</item>
|
||||
<item name="materialIconButtonStyle">@style/Widget.Material3Expressive.Button.IconButton</item>
|
||||
<item name="floatingToolbarStyle">@style/Widget.Material3.FloatingToolbar.Vibrant</item>
|
||||
<item name="dockedToolbarStyle">@style/Widget.Material3.DockedToolbar.Vibrant</item>
|
||||
|
||||
<item name="materialButtonGroupStyle">@style/Widget.Material3Expressive.MaterialButtonGroup</item>
|
||||
<item name="materialButtonToggleGroupStyle">@style/Widget.Material3Expressive.MaterialButtonToggleGroup</item>
|
||||
|
||||
<item name="bottomNavigationStyle">@style/Widget.Material3Expressive.BottomNavigationView</item>
|
||||
<item name="navigationRailStyle">@style/Widget.Material3Expressive.NavigationRailView</item>
|
||||
|
||||
<item name="toolbarStyle">@style/Widget.Material3Expressive.Toolbar</item>
|
||||
<item name="toolbarSurfaceStyle">@style/Widget.Material3Expressive.Toolbar.Surface</item>
|
||||
|
||||
<item name="linearProgressIndicatorStyle">@style/Widget.Material3Expressive.LinearProgressIndicator</item>
|
||||
<item name="circularProgressIndicatorStyle">@style/Widget.Material3Expressive.CircularProgressIndicator</item>
|
||||
|
||||
<item name="sliderStyle">@style/Widget.Material3Expressive.Slider.Xsmall</item>
|
||||
|
||||
<item name="collapsingToolbarLayoutMediumSize">@dimen/m3_comp_app_bar_medium_flexible_container_height</item>
|
||||
<item name="collapsingToolbarLayoutLargeSize">@dimen/m3_comp_app_bar_large_flexible_container_height</item>
|
||||
|
||||
<item name="actionBarSize">@dimen/m3_comp_app_bar_small_container_height</item>
|
||||
|
||||
<item name="dynamicColorThemeOverlay">@style/ThemeOverlay.Material3Expressive.DynamicColors.DayNight</item>
|
||||
</style>
|
||||
|
||||
<!-- Changes only for night -->
|
||||
|
||||
@@ -4,34 +4,35 @@ activity = "1.10.1"
|
||||
adapterdelegates = "4.3.2"
|
||||
appcompat = "1.7.0"
|
||||
avifDecoder = "1.1.1.14d8e3c4"
|
||||
biometric = "1.2.0-alpha05"
|
||||
coil = "3.1.0"
|
||||
biometric = "1.4.0-alpha03"
|
||||
coil = "3.2.0"
|
||||
collections = "1.5.0"
|
||||
#noinspection NewerVersionAvailable,GradleDependency - 2.5.3 cause crashes
|
||||
conscrypt = "2.5.2"
|
||||
constraintlayout = "2.2.1"
|
||||
coreKtx = "1.16.0"
|
||||
coroutines = "1.10.2"
|
||||
dagger = "2.56.2"
|
||||
desugar = "2.1.5"
|
||||
diskLruCache = "1.5"
|
||||
documentfile = "1.1.0"
|
||||
fragment = "1.8.6"
|
||||
gradle = "8.10.0"
|
||||
guava = "33.4.8-android"
|
||||
dagger = "2.56.2"
|
||||
hilt = "1.2.0"
|
||||
json = "20250107"
|
||||
json = "20250517"
|
||||
junit = "4.13.2"
|
||||
junitKtx = "1.2.1"
|
||||
kotlin = "2.1.20"
|
||||
ksp = "2.1.20-2.0.0"
|
||||
kotlin = "2.1.21"
|
||||
ksp = "2.1.21-2.0.1"
|
||||
leakcanary = "3.0-alpha-8"
|
||||
lifecycle = "2.9.0"
|
||||
markwon = "4.6.2"
|
||||
material = "1.13.0-alpha13"
|
||||
material = "1.14.0-alpha01"
|
||||
moshi = "1.15.2"
|
||||
okhttp = "4.12.0"
|
||||
okio = "3.11.0"
|
||||
parsers = "9408b9ba1b"
|
||||
parsers = "276349e23c"
|
||||
preference = "1.2.1"
|
||||
recyclerview = "1.4.0"
|
||||
room = "2.7.1"
|
||||
@@ -52,10 +53,11 @@ adapterdelegates = { module = "com.hannesdorfmann:adapterdelegates4-kotlin-dsl",
|
||||
adapterdelegates-viewbinding = { module = "com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding", version.ref = "adapterdelegates" }
|
||||
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
|
||||
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
|
||||
androidx-biometric = { module = "androidx.biometric:biometric-ktx", version.ref = "biometric" }
|
||||
androidx-biometric = { module = "androidx.biometric:biometric", version.ref = "biometric" }
|
||||
androidx-collection = { module = "androidx.collection:collection-ktx", version.ref = "collections" }
|
||||
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
|
||||
androidx-core = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
|
||||
androidx-documentfile = { module = "androidx.documentfile:documentfile", version.ref = "documentfile" }
|
||||
androidx-fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "fragment" }
|
||||
androidx-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "hilt" }
|
||||
androidx-hilt-work = { module = "androidx.hilt:hilt-work", version.ref = "hilt" }
|
||||
|
||||
Reference in New Issue
Block a user