From 7e4c45858f6fd2309f8ca07e1e4c4798ab87b764 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 29 Jun 2022 22:45:11 -0400 Subject: [PATCH] Bump dependencies --- app/build.gradle.kts | 2 +- .../java/eu/kanade/data/TransactionContext.kt | 3 +- .../eu/kanade/presentation/util/Scrollbar.kt | 3 +- .../data/backup/full/models/BackupChapter.kt | 2 +- .../data/backup/full/models/BackupTracking.kt | 2 +- .../ui/download/DownloadHeaderHolder.kt | 3 +- .../kanade/tachiyomi/ui/main/MainActivity.kt | 2 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 17 ++++----- .../ui/reader/model/ReaderChapter.kt | 6 ++-- .../ui/reader/setting/ReaderSettingsSheet.kt | 35 ++++++++++--------- .../database/ClearDatabaseController.kt | 2 +- .../widget/TachiyomiBottomNavigationView.kt | 13 +++---- .../widget/preference/ThemesPreference.kt | 13 +++---- .../widget/sheet/BottomSheetViewPager.kt | 11 +++--- gradle/androidx.versions.toml | 4 +-- gradle/compose.versions.toml | 7 ++-- gradle/kotlinx.versions.toml | 6 ++-- gradle/libs.versions.toml | 4 +-- 18 files changed, 71 insertions(+), 64 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f57149dd2..69268563f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -125,7 +125,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = compose.versions.compose.get() + kotlinCompilerExtensionVersion = compose.versions.compiler.get() } compileOptions { diff --git a/app/src/main/java/eu/kanade/data/TransactionContext.kt b/app/src/main/java/eu/kanade/data/TransactionContext.kt index 828a5fc17..52794d539 100644 --- a/app/src/main/java/eu/kanade/data/TransactionContext.kt +++ b/app/src/main/java/eu/kanade/data/TransactionContext.kt @@ -116,7 +116,8 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread( // Couldn't acquire a thread, cancel coroutine. continuation.cancel( IllegalStateException( - "Unable to acquire a thread to perform the database transaction.", ex, + "Unable to acquire a thread to perform the database transaction.", + ex, ), ) } diff --git a/app/src/main/java/eu/kanade/presentation/util/Scrollbar.kt b/app/src/main/java/eu/kanade/presentation/util/Scrollbar.kt index 6fa48d508..5f2eef126 100644 --- a/app/src/main/java/eu/kanade/presentation/util/Scrollbar.kt +++ b/app/src/main/java/eu/kanade/presentation/util/Scrollbar.kt @@ -88,7 +88,8 @@ private fun Modifier.drawScrollbar( reverseScrolling: Boolean, positionOffset: Float, ): Modifier = drawScrollbar( - orientation, reverseScrolling, + orientation, + reverseScrolling, ) { reverseDirection, atEnd, thickness, color, alpha -> val layoutInfo = state.layoutInfo val viewportSize = if (orientation == Orientation.Horizontal) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt index ffca3a255..9ecb7fd1f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupChapter.kt @@ -49,7 +49,7 @@ val backupChapterMapper = { chapterNumber: Float, source_order: Long, dateFetch: Long, - dateUpload: Long, -> + dateUpload: Long, -> BackupChapter( url = url, name = name, diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt index e87cd342d..0c38fefbf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupTracking.kt @@ -62,7 +62,7 @@ val backupTrackMapper = { score: Float, remoteUrl: String, startDate: Long, - finishDate: Long, -> + finishDate: Long, -> BackupTracking( syncId = syncId.toInt(), mediaId = mediaId, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderHolder.kt index 59d604974..3362c99ed 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHeaderHolder.kt @@ -28,8 +28,7 @@ class DownloadHeaderHolder(view: View, adapter: FlexibleAdapter<*>) : Expandable override fun onItemReleased(position: Int) { super.onItemReleased(position) binding.container.isDragged = false - mAdapter as DownloadAdapter mAdapter.expandAll() - mAdapter.downloadItemListener.onItemReleased(position) + (mAdapter as DownloadAdapter).downloadItemListener.onItemReleased(position) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 89d3a0588..e2f3e3c6b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -473,7 +473,7 @@ class MainActivity : BaseActivity() { // Binding sometimes isn't actually instantiated yet somehow nav?.setOnItemSelectedListener(null) - binding?.toolbar.setNavigationOnClickListener(null) + binding?.toolbar?.setNavigationOnClickListener(null) } override fun onBackPressed() { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index fc8b9239e..d6f2cd450 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -366,15 +366,16 @@ class ReaderActivity : BaseRxActivity() { } // Init listeners on bottom menu - binding.pageSlider.addOnSliderTouchListener(object : Slider.OnSliderTouchListener { - override fun onStartTrackingTouch(slider: Slider) { - isScrollingThroughPages = true - } + binding.pageSlider.addOnSliderTouchListener( + object : Slider.OnSliderTouchListener { + override fun onStartTrackingTouch(slider: Slider) { + isScrollingThroughPages = true + } - override fun onStopTrackingTouch(slider: Slider) { - isScrollingThroughPages = false - } - }, + override fun onStopTrackingTouch(slider: Slider) { + isScrollingThroughPages = false + } + }, ) binding.pageSlider.addOnChangeListener { slider, value, fromUser -> if (viewer != null && fromUser) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt index b475c6a4f..a332a96ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderChapter.kt @@ -10,9 +10,9 @@ data class ReaderChapter(val chapter: Chapter) { var state: State = State.Wait set(value) { - field = value - stateRelay.call(value) - } + field = value + stateRelay.call(value) + } private val stateRelay by lazy { BehaviorRelay.create(state) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt index 4e22f8418..14386d3c5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderSettingsSheet.kt @@ -34,27 +34,28 @@ class ReaderSettingsSheet( behavior.halfExpandedRatio = 0.25f val filterTabIndex = getTabViews().indexOf(colorFilterSettings) - binding.tabs.addOnTabSelectedListener(object : SimpleTabSelectedListener() { - override fun onTabSelected(tab: TabLayout.Tab?) { - val isFilterTab = tab?.position == filterTabIndex + binding.tabs.addOnTabSelectedListener( + object : SimpleTabSelectedListener() { + override fun onTabSelected(tab: TabLayout.Tab?) { + val isFilterTab = tab?.position == filterTabIndex - // Remove dimmed backdrop so color filter changes can be previewed - backgroundDimAnimator.run { - if (isFilterTab) { - if (animatedFraction < 1f) { - start() + // Remove dimmed backdrop so color filter changes can be previewed + backgroundDimAnimator.run { + if (isFilterTab) { + if (animatedFraction < 1f) { + 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) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt index 9002efc41..a0992b95d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt @@ -64,7 +64,7 @@ class ClearDatabaseController : adapter = FlexibleAdapter(null, this, true) binding.recycler.adapter = adapter - binding.recycler.layoutManager = LinearLayoutManager(activity) + binding.recycler.layoutManager = LinearLayoutManager(view.context) binding.recycler.setHasFixedSize(true) adapter?.fastScroller = binding.fastScroller recycler = binding.recycler diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt index 4447cd96d..a7345270b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/TachiyomiBottomNavigationView.kt @@ -86,12 +86,13 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor( .setInterpolator(interpolator) .setDuration(duration) .applySystemAnimatorScale(context) - .setListener(object : AnimatorListenerAdapter() { - override fun onAnimationEnd(animation: Animator) { - currentAnimator = null - postInvalidate() - } - }, + .setListener( + object : AnimatorListenerAdapter() { + override fun onAnimationEnd(animation: Animator) { + currentAnimator = null + postInvalidate() + } + }, ) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt index e8769990a..576859fe6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/ThemesPreference.kt @@ -37,12 +37,13 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib recycler?.adapter = adapter // Retain scroll position on activity recreate after changing theme - recycler?.addOnScrollListener(object : RecyclerView.OnScrollListener() { - override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { - super.onScrolled(recyclerView, dx, dy) - lastScrollPosition = recyclerView.computeHorizontalScrollOffset() - } - }, + recycler?.addOnScrollListener( + object : RecyclerView.OnScrollListener() { + override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { + super.onScrolled(recyclerView, dx, dy) + lastScrollPosition = recyclerView.computeHorizontalScrollOffset() + } + }, ) lastScrollPosition?.let { scrollToOffset(it) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt index f72eb3112..91b710757 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/sheet/BottomSheetViewPager.kt @@ -45,11 +45,12 @@ class BottomSheetViewPager @JvmOverloads constructor( } init { - addOnPageChangeListener(object : SimpleOnPageChangeListener() { - override fun onPageSelected(position: Int) { - requestLayout() - } - }, + addOnPageChangeListener( + object : SimpleOnPageChangeListener() { + override fun onPageSelected(position: Int) { + requestLayout() + } + }, ) } } diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index 50f77bc41..327c04579 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -1,6 +1,6 @@ [versions] agp_version = "7.2.1" -lifecycle_version = "2.5.0-rc02" +lifecycle_version = "2.5.0" [libraries] 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" corektx = "androidx.core:core-ktx:1.8.0" 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" viewpager = "androidx.viewpager:viewpager:1.1.0-alpha01" diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 22f64d06e..5897b4cbc 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,7 +1,8 @@ [versions] -compose = "1.2.0-rc02" +compiler = "1.2.0" +compose = "1.3.0-alpha01" accompanist = "0.24.12-rc" -material3 = "1.0.0-alpha13" +material3 = "1.0.0-alpha14" [libraries] 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-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" } accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" } diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index 13a6dd8d9..8b1097997 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin_version = "1.6.21" +kotlin_version = "1.7.0" coroutines_version = "1.6.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-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] coroutines = ["coroutines-core", "coroutines-android"] serialization = ["serialization-json", "serialization-protobuf"] [plugins] -android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin_version"} \ No newline at end of file +android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin_version" } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8b2b65e09..480238f6d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -111,5 +111,5 @@ conductor = ["conductor-core", "conductor-viewpager", "conductor-support-prefere shizuku = ["shizuku-api", "shizuku-provider"] [plugins] -kotlinter = { id = "org.jmailen.kotlinter", version = "3.10.0"} -versionsx = { id = "com.github.ben-manes.versions", version = "0.42.0"} \ No newline at end of file +kotlinter = { id = "org.jmailen.kotlinter", version = "3.11.1" } +versionsx = { id = "com.github.ben-manes.versions", version = "0.42.0" } \ No newline at end of file