Skip to content

Commit

Permalink
Remove loadingbutton library lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproto committed Aug 24, 2024
1 parent 51a2fcb commit 13f69eb
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 245 deletions.
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ dependencies {

// UI
implementation(libs.bundles.fastadapter)
implementation(libs.loadingButtonAndroid)

implementation(libs.bundles.flexibleadapter)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() ||
Expand Down Expand Up @@ -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) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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) }
}
}

Expand Down
205 changes: 0 additions & 205 deletions app/src/main/res/layout/list_stats_details.xml

This file was deleted.

25 changes: 16 additions & 9 deletions app/src/main/res/layout/pref_account_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,28 @@
android:inputType="textNoSuggestions" />
</com.google.android.material.textfield.TextInputLayout>


<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
<Button
android:id="@+id/login"
style="@style/Theme.Widget.Button.Primary"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:scaleType="fitCenter"
android:text="@string/log_in"
android:textSize="16sp"
app:finalCornerAngle="50dp"
app:initialCornerAngle="2dp"
app:spinning_bar_color="@color/md_white_1000"
app:spinning_bar_padding="6dp"
app:spinning_bar_width="3dp" />
android:textSize="16sp" />

<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progress"
style="@style/Widget.Material3.LinearProgressIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
tools:visibility="visible"
android:indeterminate="true"
app:showAnimationBehavior="inward"
app:hideAnimationBehavior="outward"
android:visibility="invisible" />

</LinearLayout>
26 changes: 17 additions & 9 deletions app/src/main/res/layout/pref_site_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,27 @@
tools:visibility="visible"
android:text="@string/two_factor" />

<br.com.simplepass.loadingbutton.customViews.CircularProgressButton
<Button
android:id="@+id/login"
style="@style/Theme.Widget.Button.Primary"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:text="@string/log_in"
android:textSize="16sp"
app:finalCornerAngle="50dp"
app:initialCornerAngle="2dp"
app:spinning_bar_color="@color/md_white_1000"
app:spinning_bar_padding="6dp"
app:spinning_bar_width="3dp" />
android:textSize="16sp" />

</LinearLayout>

<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progress"
style="@style/Widget.Material3.LinearProgressIndicator"
android:layout_width="match_parent"
android:layout_height="3dp"
android:paddingTop="2dp"
tools:visibility="visible"
android:indeterminate="true"
app:showAnimationBehavior="inward"
app:hideAnimationBehavior="outward"
android:visibility="gone" />

</LinearLayout>
1 change: 0 additions & 1 deletion gradle/kotlinx.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }


Expand Down
4 changes: 0 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand Down

0 comments on commit 13f69eb

Please sign in to comment.