Bump dependencies

This commit is contained in:
arkon 2022-06-29 22:45:11 -04:00
parent d476431707
commit 7e4c45858f
18 changed files with 71 additions and 64 deletions

View File

@ -125,7 +125,7 @@ android {
} }
composeOptions { composeOptions {
kotlinCompilerExtensionVersion = compose.versions.compose.get() kotlinCompilerExtensionVersion = compose.versions.compiler.get()
} }
compileOptions { compileOptions {

View File

@ -116,7 +116,8 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread(
// Couldn't acquire a thread, cancel coroutine. // Couldn't acquire a thread, cancel coroutine.
continuation.cancel( continuation.cancel(
IllegalStateException( IllegalStateException(
"Unable to acquire a thread to perform the database transaction.", ex, "Unable to acquire a thread to perform the database transaction.",
ex,
), ),
) )
} }

View File

@ -88,7 +88,8 @@ private fun Modifier.drawScrollbar(
reverseScrolling: Boolean, reverseScrolling: Boolean,
positionOffset: Float, positionOffset: Float,
): Modifier = drawScrollbar( ): Modifier = drawScrollbar(
orientation, reverseScrolling, orientation,
reverseScrolling,
) { reverseDirection, atEnd, thickness, color, alpha -> ) { reverseDirection, atEnd, thickness, color, alpha ->
val layoutInfo = state.layoutInfo val layoutInfo = state.layoutInfo
val viewportSize = if (orientation == Orientation.Horizontal) { val viewportSize = if (orientation == Orientation.Horizontal) {

View File

@ -49,7 +49,7 @@ val backupChapterMapper = {
chapterNumber: Float, chapterNumber: Float,
source_order: Long, source_order: Long,
dateFetch: Long, dateFetch: Long,
dateUpload: Long, -> dateUpload: Long, ->
BackupChapter( BackupChapter(
url = url, url = url,
name = name, name = name,

View File

@ -62,7 +62,7 @@ val backupTrackMapper = {
score: Float, score: Float,
remoteUrl: String, remoteUrl: String,
startDate: Long, startDate: Long,
finishDate: Long, -> finishDate: Long, ->
BackupTracking( BackupTracking(
syncId = syncId.toInt(), syncId = syncId.toInt(),
mediaId = mediaId, mediaId = mediaId,

View File

@ -28,8 +28,7 @@ class DownloadHeaderHolder(view: View, adapter: FlexibleAdapter<*>) : Expandable
override fun onItemReleased(position: Int) { override fun onItemReleased(position: Int) {
super.onItemReleased(position) super.onItemReleased(position)
binding.container.isDragged = false binding.container.isDragged = false
mAdapter as DownloadAdapter
mAdapter.expandAll() mAdapter.expandAll()
mAdapter.downloadItemListener.onItemReleased(position) (mAdapter as DownloadAdapter).downloadItemListener.onItemReleased(position)
} }
} }

View File

@ -473,7 +473,7 @@ class MainActivity : BaseActivity() {
// Binding sometimes isn't actually instantiated yet somehow // Binding sometimes isn't actually instantiated yet somehow
nav?.setOnItemSelectedListener(null) nav?.setOnItemSelectedListener(null)
binding?.toolbar.setNavigationOnClickListener(null) binding?.toolbar?.setNavigationOnClickListener(null)
} }
override fun onBackPressed() { override fun onBackPressed() {

View File

@ -366,15 +366,16 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
} }
// Init listeners on bottom menu // Init listeners on bottom menu
binding.pageSlider.addOnSliderTouchListener(object : Slider.OnSliderTouchListener { binding.pageSlider.addOnSliderTouchListener(
override fun onStartTrackingTouch(slider: Slider) { object : Slider.OnSliderTouchListener {
isScrollingThroughPages = true override fun onStartTrackingTouch(slider: Slider) {
} isScrollingThroughPages = true
}
override fun onStopTrackingTouch(slider: Slider) { override fun onStopTrackingTouch(slider: Slider) {
isScrollingThroughPages = false isScrollingThroughPages = false
} }
}, },
) )
binding.pageSlider.addOnChangeListener { slider, value, fromUser -> binding.pageSlider.addOnChangeListener { slider, value, fromUser ->
if (viewer != null && fromUser) { if (viewer != null && fromUser) {

View File

@ -10,9 +10,9 @@ data class ReaderChapter(val chapter: Chapter) {
var state: State = var state: State =
State.Wait State.Wait
set(value) { set(value) {
field = value field = value
stateRelay.call(value) stateRelay.call(value)
} }
private val stateRelay by lazy { BehaviorRelay.create(state) } private val stateRelay by lazy { BehaviorRelay.create(state) }

View File

@ -34,27 +34,28 @@ class ReaderSettingsSheet(
behavior.halfExpandedRatio = 0.25f behavior.halfExpandedRatio = 0.25f
val filterTabIndex = getTabViews().indexOf(colorFilterSettings) val filterTabIndex = getTabViews().indexOf(colorFilterSettings)
binding.tabs.addOnTabSelectedListener(object : SimpleTabSelectedListener() { binding.tabs.addOnTabSelectedListener(
override fun onTabSelected(tab: TabLayout.Tab?) { object : SimpleTabSelectedListener() {
val isFilterTab = tab?.position == filterTabIndex override fun onTabSelected(tab: TabLayout.Tab?) {
val isFilterTab = tab?.position == filterTabIndex
// Remove dimmed backdrop so color filter changes can be previewed // Remove dimmed backdrop so color filter changes can be previewed
backgroundDimAnimator.run { backgroundDimAnimator.run {
if (isFilterTab) { if (isFilterTab) {
if (animatedFraction < 1f) { if (animatedFraction < 1f) {
start() start()
}
} else if (animatedFraction > 0f) {
reverse()
} }
} else if (animatedFraction > 0f) { }
reverse()
// Hide toolbars
if (activity.menuVisible != !isFilterTab) {
activity.setMenuVisibility(!isFilterTab)
} }
} }
},
// Hide toolbars
if (activity.menuVisible != !isFilterTab) {
activity.setMenuVisibility(!isFilterTab)
}
}
},
) )
if (showColorFilterSettings) { if (showColorFilterSettings) {

View File

@ -64,7 +64,7 @@ class ClearDatabaseController :
adapter = FlexibleAdapter<ClearDatabaseSourceItem>(null, this, true) adapter = FlexibleAdapter<ClearDatabaseSourceItem>(null, this, true)
binding.recycler.adapter = adapter binding.recycler.adapter = adapter
binding.recycler.layoutManager = LinearLayoutManager(activity) binding.recycler.layoutManager = LinearLayoutManager(view.context)
binding.recycler.setHasFixedSize(true) binding.recycler.setHasFixedSize(true)
adapter?.fastScroller = binding.fastScroller adapter?.fastScroller = binding.fastScroller
recycler = binding.recycler recycler = binding.recycler

View File

@ -86,12 +86,13 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
.setInterpolator(interpolator) .setInterpolator(interpolator)
.setDuration(duration) .setDuration(duration)
.applySystemAnimatorScale(context) .applySystemAnimatorScale(context)
.setListener(object : AnimatorListenerAdapter() { .setListener(
override fun onAnimationEnd(animation: Animator) { object : AnimatorListenerAdapter() {
currentAnimator = null override fun onAnimationEnd(animation: Animator) {
postInvalidate() currentAnimator = null
} postInvalidate()
}, }
},
) )
} }

View File

@ -37,12 +37,13 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib
recycler?.adapter = adapter recycler?.adapter = adapter
// Retain scroll position on activity recreate after changing theme // Retain scroll position on activity recreate after changing theme
recycler?.addOnScrollListener(object : RecyclerView.OnScrollListener() { recycler?.addOnScrollListener(
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { object : RecyclerView.OnScrollListener() {
super.onScrolled(recyclerView, dx, dy) override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
lastScrollPosition = recyclerView.computeHorizontalScrollOffset() super.onScrolled(recyclerView, dx, dy)
} lastScrollPosition = recyclerView.computeHorizontalScrollOffset()
}, }
},
) )
lastScrollPosition?.let { scrollToOffset(it) } lastScrollPosition?.let { scrollToOffset(it) }
} }

View File

@ -45,11 +45,12 @@ class BottomSheetViewPager @JvmOverloads constructor(
} }
init { init {
addOnPageChangeListener(object : SimpleOnPageChangeListener() { addOnPageChangeListener(
override fun onPageSelected(position: Int) { object : SimpleOnPageChangeListener() {
requestLayout() override fun onPageSelected(position: Int) {
} requestLayout()
}, }
},
) )
} }
} }

View File

@ -1,6 +1,6 @@
[versions] [versions]
agp_version = "7.2.1" agp_version = "7.2.1"
lifecycle_version = "2.5.0-rc02" lifecycle_version = "2.5.0"
[libraries] [libraries]
annotation = "androidx.annotation:annotation:1.4.0" annotation = "androidx.annotation:annotation:1.4.0"
@ -10,7 +10,7 @@ constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:1.2.0" coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
corektx = "androidx.core:core-ktx:1.8.0" corektx = "androidx.core:core-ktx:1.8.0"
splashscreen = "androidx.core:core-splashscreen:1.0.0-alpha02" splashscreen = "androidx.core:core-splashscreen:1.0.0-alpha02"
recyclerview = "androidx.recyclerview:recyclerview:1.3.0-alpha02" recyclerview = "androidx.recyclerview:recyclerview:1.3.0-beta01"
swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01" swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01"
viewpager = "androidx.viewpager:viewpager:1.1.0-alpha01" viewpager = "androidx.viewpager:viewpager:1.1.0-alpha01"

View File

@ -1,7 +1,8 @@
[versions] [versions]
compose = "1.2.0-rc02" compiler = "1.2.0"
compose = "1.3.0-alpha01"
accompanist = "0.24.12-rc" accompanist = "0.24.12-rc"
material3 = "1.0.0-alpha13" material3 = "1.0.0-alpha14"
[libraries] [libraries]
activity = "androidx.activity:activity-compose:1.6.0-alpha05" activity = "androidx.activity:activity-compose:1.6.0-alpha05"
@ -13,7 +14,7 @@ ui-util = { module = "androidx.compose.ui:ui-util", version.ref = "compose" }
material3-core = { module = "androidx.compose.material3:material3", version.ref = "material3" } material3-core = { module = "androidx.compose.material3:material3", version.ref = "material3" }
material3-windowsizeclass = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "material3" } material3-windowsizeclass = { module = "androidx.compose.material3:material3-window-size-class", version.ref = "material3" }
material3-adapter = "com.google.android.material:compose-theme-adapter-3:1.0.12" material3-adapter = "com.google.android.material:compose-theme-adapter-3:1.0.13"
material-icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" } material-icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" }
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" } accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" }

View File

@ -1,5 +1,5 @@
[versions] [versions]
kotlin_version = "1.6.21" kotlin_version = "1.7.0"
coroutines_version = "1.6.3" coroutines_version = "1.6.3"
serialization_version = "1.3.3" serialization_version = "1.3.3"
@ -12,11 +12,11 @@ coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-androi
serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_version" } serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_version" }
serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization_version" } serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization_version" }
serialization-gradle = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version"} serialization-gradle = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version" }
[bundles] [bundles]
coroutines = ["coroutines-core", "coroutines-android"] coroutines = ["coroutines-core", "coroutines-android"]
serialization = ["serialization-json", "serialization-protobuf"] serialization = ["serialization-json", "serialization-protobuf"]
[plugins] [plugins]
android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin_version"} android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin_version" }

View File

@ -111,5 +111,5 @@ conductor = ["conductor-core", "conductor-viewpager", "conductor-support-prefere
shizuku = ["shizuku-api", "shizuku-provider"] shizuku = ["shizuku-api", "shizuku-provider"]
[plugins] [plugins]
kotlinter = { id = "org.jmailen.kotlinter", version = "3.10.0"} kotlinter = { id = "org.jmailen.kotlinter", version = "3.11.1" }
versionsx = { id = "com.github.ben-manes.versions", version = "0.42.0"} versionsx = { id = "com.github.ben-manes.versions", version = "0.42.0" }