Compare commits

...

4 Commits

Author SHA1 Message Date
Cody Henthorne
236e3f7e81 Bump version to 5.41.13 2022-07-01 15:37:44 -04:00
Cody Henthorne
f772f98947 Fix clickable state bug with CircularProgressMaterialButton. 2022-07-01 15:22:12 -04:00
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
3 changed files with 23 additions and 6 deletions

View File

@@ -58,14 +58,14 @@ ktlint {
}
def canonicalVersionCode = 1076
def canonicalVersionName = "5.41.11"
def canonicalVersionName = "5.41.13"
def postFixSize = 100
def abiPostFix = ['universal' : 0,
'armeabi-v7a' : 1,
'arm64-v8a' : 2,
'x86' : 3,
'x86_64' : 4]
def abiPostFix = ['universal' : 10,
'armeabi-v7a' : 11,
'arm64-v8a' : 12,
'x86' : 13,
'x86_64' : 14]
def keystores = [ 'debug' : loadKeystoreProperties('keystore.debug.properties') ]

View File

@@ -91,12 +91,14 @@ public class EditProfileNameFragment extends Fragment {
setEditTextEnabled(familyName, true);
break;
case IDLE:
saveButton.setClickable(true);
saveButton.cancelSpinning();
saveButton.setAlpha(1);
setEditTextEnabled(givenName, true);
setEditTextEnabled(familyName, true);
break;
case IN_PROGRESS:
saveButton.setClickable(false);
saveButton.setSpinning();
saveButton.setAlpha(1);
setEditTextEnabled(givenName, false);

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,18 @@ class CircularProgressMaterialButton @JvmOverloads constructor(
materialButton.setText(resId)
}
override fun setEnabled(enabled: Boolean) {
super.setEnabled(enabled)
materialButton.isEnabled = enabled
progressIndicator.visible = enabled
}
override fun setClickable(clickable: Boolean) {
super.setClickable(clickable)
materialButton.isClickable = clickable
progressIndicator.visible = clickable
}
override fun onSaveInstanceState(): Parcelable {
return Bundle().apply {
putParcelable(SUPER_STATE, super.onSaveInstanceState())