From 13f69ebc2dcc17b9a8f02143c2b60a1b3a1e70fe Mon Sep 17 00:00:00 2001 From: nonproto <2092019+nonproto@users.noreply.github.com> Date: Sat, 24 Aug 2024 06:14:45 -0400 Subject: [PATCH] Remove loadingbutton library lib --- app/build.gradle.kts | 1 - .../widget/preference/KomgaLoginDialog.kt | 13 +- .../widget/preference/TrackLoginDialog.kt | 14 +- .../main/res/layout/list_stats_details.xml | 205 ------------------ .../main/res/layout/pref_account_login.xml | 25 ++- app/src/main/res/layout/pref_site_login.xml | 26 ++- gradle/kotlinx.versions.toml | 1 - gradle/libs.versions.toml | 4 - 8 files changed, 44 insertions(+), 245 deletions(-) delete mode 100644 app/src/main/res/layout/list_stats_details.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e050281463..85dffee5b0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -165,7 +165,6 @@ dependencies { // UI implementation(libs.bundles.fastadapter) - implementation(libs.loadingButtonAndroid) implementation(libs.bundles.flexibleadapter) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/KomgaLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/KomgaLoginDialog.kt index 48080a2d5b..2d3034f001 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/KomgaLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/KomgaLoginDialog.kt @@ -4,7 +4,6 @@ import android.app.Dialog import android.os.Bundle import android.view.View import android.widget.Toast -import br.com.simplepass.loadingbutton.animatedDrawables.ProgressType import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.merged.komga.Komga @@ -51,10 +50,8 @@ class KomgaLoginDialog(bundle: Bundle? = null) : override fun checkLogin() { v?.apply { - binding.login.apply { - progressType = ProgressType.INDETERMINATE - startAnimation() - } + binding.progress.visibility = View.VISIBLE + binding.login.visibility = View.GONE if (binding.username.text.isNullOrBlank() || binding.password.text.isNullOrBlank() || @@ -102,9 +99,9 @@ class KomgaLoginDialog(bundle: Bundle? = null) : v?.apply { dialog?.setCancelable(true) dialog?.setCanceledOnTouchOutside(true) - binding.login.revertAnimation { - binding.login.text = activity!!.getText(R.string.unknown_error) - } + binding.progress.visibility = View.GONE + binding.login.visibility = View.VISIBLE + scope.launch { context.toast(R.string.unknown_error) } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt index 41c629a1db..ab5a8f1984 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt @@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.widget.preference import android.os.Bundle import android.view.View import androidx.annotation.StringRes -import br.com.simplepass.loadingbutton.animatedDrawables.ProgressType import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.util.system.toast @@ -36,10 +35,9 @@ class TrackLoginDialog(@StringRes usernameLabelRes: Int? = null, bundle: Bundle? override fun checkLogin() { v?.apply { - binding.login.apply { - progressType = ProgressType.INDETERMINATE - startAnimation() - } + binding.progress.visibility = View.VISIBLE + binding.login.visibility = View.GONE + if (binding.username.text.isNullOrBlank() || binding.password.text.isNullOrBlank()) { errorResult() context.toast(R.string.username_must_not_be_blank) @@ -72,9 +70,9 @@ class TrackLoginDialog(@StringRes usernameLabelRes: Int? = null, bundle: Bundle? v?.apply { dialog?.setCancelable(true) dialog?.setCanceledOnTouchOutside(true) - binding.login.revertAnimation { - binding.login.text = activity!!.getText(R.string.unknown_error) - } + binding.progress.visibility = View.GONE + binding.login.visibility = View.VISIBLE + scope.launch { context.toast(R.string.unknown_error) } } } diff --git a/app/src/main/res/layout/list_stats_details.xml b/app/src/main/res/layout/list_stats_details.xml deleted file mode 100644 index 22a2de4034..0000000000 --- a/app/src/main/res/layout/list_stats_details.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/pref_account_login.xml b/app/src/main/res/layout/pref_account_login.xml index aa06d97fd5..d0df4cbc6d 100644 --- a/app/src/main/res/layout/pref_account_login.xml +++ b/app/src/main/res/layout/pref_account_login.xml @@ -66,21 +66,28 @@ android:inputType="textNoSuggestions" /> - - + android:textSize="16sp" /> + + diff --git a/app/src/main/res/layout/pref_site_login.xml b/app/src/main/res/layout/pref_site_login.xml index 0e8ae8e118..10312db361 100644 --- a/app/src/main/res/layout/pref_site_login.xml +++ b/app/src/main/res/layout/pref_site_login.xml @@ -71,19 +71,27 @@ tools:visibility="visible" android:text="@string/two_factor" /> - + android:textSize="16sp" /> - \ No newline at end of file + + + + diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index 529d6cf355..75665d873e 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -12,7 +12,6 @@ coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-androi serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serializationVersion" } serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serializationVersion" } -serialization-gradle = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlinVersion" } serialization-okio = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-okio", version.ref = "serializationVersion" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5724446330..7511ad2781 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,12 +12,9 @@ iconicsVersion = "5.4.0" injektCoreVersion = "65b0440" kotlinResultVersion = "2.0.0" ktfmtVersion = "0.19.0" -loadingButtonAndroidVersion = "2.2.0" -nucleusVersion = "3.0.0" okhttpVersion = "5.0.0-alpha.14" photoViewVersion = "2.3.0" retrofitVersion = "2.11.0" -roboelectricVersion = "4.8.1" rxbindingVersion = "1.0.1" sandwichVersion = "2.0.8" simpleIconsVersion = "1.0.0" @@ -31,7 +28,6 @@ viewTooltipVersion = "f79a8955ef" cascade-compose = { module = "me.saket.cascade:cascade-compose", version.ref = "cascadeComposeVersion" } cascade = { module = "me.saket.cascade:cascade", version.ref = "cascadeVersion" } injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version.ref = "injektCoreVersion" } -loadingButtonAndroid = { module = "com.github.leandroBorgesFerreira:LoadingButtonAndroid", version.ref = "loadingButtonAndroidVersion" } material = "com.google.android.material:material:1.12.0" desugaring = "com.android.tools:desugar_jdk_libs:2.0.4" photoView = { module = "com.github.chrisbanes:PhotoView", version.ref = "photoViewVersion" }