Compare commits

...

2 Commits

Author SHA1 Message Date
Cody Henthorne
597756122b Bump version to 5.41.12 2022-07-01 13:03:20 -04:00
Cody Henthorne
edc7d4d696 Fix disable state bug with CircularProgressMaterialButton. 2022-07-01 12:57:24 -04:00
2 changed files with 15 additions and 6 deletions

View File

@@ -58,14 +58,14 @@ ktlint {
}
def canonicalVersionCode = 1076
def canonicalVersionName = "5.41.11"
def canonicalVersionName = "5.41.12"
def postFixSize = 100
def abiPostFix = ['universal' : 0,
'armeabi-v7a' : 1,
'arm64-v8a' : 2,
'x86' : 3,
'x86_64' : 4]
def abiPostFix = ['universal' : 5,
'armeabi-v7a' : 6,
'arm64-v8a' : 7,
'x86' : 8,
'x86_64' : 9]
def keystores = [ 'debug' : loadKeystoreProperties('keystore.debug.properties') ]

View File

@@ -12,8 +12,10 @@ import androidx.annotation.StringRes
import androidx.core.animation.doOnEnd
import androidx.core.content.withStyledAttributes
import com.google.android.material.button.MaterialButton
import com.google.android.material.progressindicator.CircularProgressIndicator
import com.google.android.material.theme.overlay.MaterialThemeOverlay
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.util.visible
import kotlin.math.max
/**
@@ -33,6 +35,7 @@ class CircularProgressMaterialButton @JvmOverloads constructor(
private var animator: Animator? = null
private val materialButton: MaterialButton = findViewById(R.id.button)
private val progressIndicator: CircularProgressIndicator = findViewById(R.id.progress_indicator)
var text: CharSequence?
get() = materialButton.text
@@ -52,6 +55,12 @@ class CircularProgressMaterialButton @JvmOverloads constructor(
materialButton.setText(resId)
}
override fun setEnabled(enabled: Boolean) {
super.setEnabled(enabled)
materialButton.isEnabled = enabled
progressIndicator.visible = enabled
}
override fun onSaveInstanceState(): Parcelable {
return Bundle().apply {
putParcelable(SUPER_STATE, super.onSaveInstanceState())