mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Fix recording not resetting properly after a send on older API's.
Apparently onAnimationEnd is not a reliable event on some Android versions, so I've moved to instead using a simple postDelayed() that is the same length as the animation.
This commit is contained in:
parent
415fe3463d
commit
214658b99e
@ -276,17 +276,8 @@ public class InputPanel extends LinearLayout
|
|||||||
animation.setDuration(MicrophoneRecorderView.ANIMATION_DURATION);
|
animation.setDuration(MicrophoneRecorderView.ANIMATION_DURATION);
|
||||||
animation.setFillBefore(true);
|
animation.setFillBefore(true);
|
||||||
animation.setFillAfter(false);
|
animation.setFillAfter(false);
|
||||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationStart(Animation animation) {}
|
|
||||||
@Override
|
|
||||||
public void onAnimationEnd(Animation animation) {
|
|
||||||
future.set(null);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void onAnimationRepeat(Animation animation) {}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
slideToCancelView.postDelayed(() -> future.set(null), MicrophoneRecorderView.ANIMATION_DURATION);
|
||||||
slideToCancelView.setVisibility(View.GONE);
|
slideToCancelView.setVisibility(View.GONE);
|
||||||
slideToCancelView.startAnimation(animation);
|
slideToCancelView.startAnimation(animation);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user