From 152fdec855cccfb479af8f74f1d4099be0ac399c Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 26 May 2023 22:52:00 -0400 Subject: [PATCH] Minor cleanup and remove unused dependencies --- app/build.gradle.kts | 2 -- .../library/LibrarySettingsDialog.kt | 21 ++++++++----------- app/src/main/res/layout/reader_activity.xml | 7 +++---- gradle/androidx.versions.toml | 1 - gradle/libs.versions.toml | 6 ++---- 5 files changed, 14 insertions(+), 23 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7a20ae0db..dc4500b21 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -180,7 +180,6 @@ dependencies { implementation(androidx.appcompat) implementation(androidx.biometricktx) implementation(androidx.constraintlayout) - implementation(androidx.coordinatorlayout) implementation(androidx.corektx) implementation(androidx.splashscreen) implementation(androidx.recyclerview) @@ -228,7 +227,6 @@ dependencies { // UI libraries implementation(libs.material) implementation(libs.flexible.adapter.core) - implementation(libs.flexible.adapter.ui) implementation(libs.photoview) implementation(libs.directionalviewpager) { exclude(group = "androidx.viewpager", module = "viewpager") diff --git a/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt b/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt index c45e6fa37..b3a7c9af6 100644 --- a/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt @@ -13,10 +13,8 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Slider import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration @@ -28,7 +26,6 @@ import eu.kanade.presentation.components.TriStateItem import eu.kanade.presentation.util.collectAsState import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.library.LibrarySettingsScreenModel -import kotlinx.coroutines.flow.map import tachiyomi.domain.category.model.Category import tachiyomi.domain.library.model.LibraryDisplayMode import tachiyomi.domain.library.model.LibrarySort @@ -219,19 +216,19 @@ private fun ColumnScope.DisplayPage( } } - val columns by columnPreference.changes().collectAsState(initial = 0) - Column( - Modifier.weight(.5f), - ) { + val columns by columnPreference.collectAsState() + Column(modifier = Modifier.weight(0.5f)) { Text( stringResource(id = R.string.pref_library_columns), style = MaterialTheme.typography.bodyMedium, ) - if (columns > 0) { - Text(stringResource(id = R.string.pref_library_columns_per_row, columns)) - } else { - Text(stringResource(id = R.string.label_default)) - } + Text( + if (columns > 0) { + stringResource(id = R.string.pref_library_columns_per_row, columns) + } else { + stringResource(id = R.string.label_default) + }, + ) } Slider( diff --git a/app/src/main/res/layout/reader_activity.xml b/app/src/main/res/layout/reader_activity.xml index 649107ca8..17a5664e7 100644 --- a/app/src/main/res/layout/reader_activity.xml +++ b/app/src/main/res/layout/reader_activity.xml @@ -1,9 +1,8 @@ - + android:layout_height="match_parent"> - + diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index 91cf66f42..16d8796ee 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -9,7 +9,6 @@ annotation = "androidx.annotation:annotation:1.7.0-alpha02" appcompat = "androidx.appcompat:appcompat:1.6.1" biometricktx = "androidx.biometric:biometric-ktx:1.2.0-alpha05" constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4" -coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:1.2.0" corektx = "androidx.core:core-ktx:1.11.0-beta01" splashscreen = "androidx.core:core-splashscreen:1.0.0-alpha02" recyclerview = "androidx.recyclerview:recyclerview:1.3.1-rc01" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d40116e00..f3100131e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -56,7 +56,6 @@ richtext-m3 = { module = "com.halilibo.compose-richtext:richtext-ui-material3", material = "com.google.android.material:material:1.9.0" flexible-adapter-core = "com.github.arkon.FlexibleAdapter:flexible-adapter:c8013533" -flexible-adapter-ui = "com.github.arkon.FlexibleAdapter:flexible-adapter-ui:c8013533" photoview = "com.github.chrisbanes:PhotoView:2.3.0" directionalviewpager = "com.github.tachiyomiorg:DirectionalViewPager:1.0.0" insetter = "dev.chrisbanes.insetter:insetter:0.6.1" @@ -66,7 +65,7 @@ compose-simpleicons = "br.com.devsrsouza.compose.icons.android:simple-icons:1.0. logcat = "com.squareup.logcat:logcat:0.1" acra-http = "ch.acra:acra-http:5.9.7" -firebase-analytics = "com.google.firebase:firebase-analytics-ktx:21.2.2" +firebase-analytics = "com.google.firebase:firebase-analytics-ktx:21.3.0" aboutLibraries-gradle = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlib_version" } aboutLibraries-compose = { module = "com.mikepenz:aboutlibraries-compose", version.ref = "aboutlib_version" } @@ -84,6 +83,7 @@ sqldelight-gradle = { module = "com.squareup.sqldelight:gradle-plugin", version. junit = "org.junit.jupiter:junit-jupiter:5.9.3" kotest-assertions = "io.kotest:kotest-assertions-core:5.6.2" +mockk = "io.mockk:mockk:1.13.5" voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager" } voyager-tab-navigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager" } @@ -91,8 +91,6 @@ voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", vers kotlinter = "org.jmailen.gradle:kotlinter-gradle:3.13.0" -mockk = "io.mockk:mockk:1.13.5" - [bundles] reactivex = ["rxandroid", "rxjava", "rxrelay"] okhttp = ["okhttp-core", "okhttp-logging", "okhttp-dnsoverhttps"]