From a951c7edfeb26839cf61d182725b23dd24bdda74 Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Tue, 28 Apr 2026 16:43:00 -0400 Subject: [PATCH] Fix undownloaded voice note button UI bug. --- .../securesms/components/AudioView.java | 19 +++++---- app/src/main/res/layout/audio_view_circle.xml | 31 +++++++++----- .../res/layout/audio_view_circle_small.xml | 27 ++++++++----- .../res/layout/audio_view_draft_circle.xml | 40 +++++++++---------- 4 files changed, 69 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java b/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java index 8f15bb81e2..471fbe63b9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/AudioView.java @@ -63,6 +63,7 @@ public final class AudioView extends FrameLayout { @NonNull private final AnimatingToggle controlToggle; @NonNull private final View progressAndPlay; @NonNull private final LottieAnimationView playPauseButton; + @NonNull private final View downloadContainer; @NonNull private final ImageView downloadButton; @Nullable private final ProgressWheel circleProgress; @NonNull private final SeekBar seekBar; @@ -121,13 +122,14 @@ public final class AudioView extends FrameLayout { throw new IllegalStateException("Unsupported mode: " + mode); } - this.controlToggle = findViewById(R.id.control_toggle); - this.playPauseButton = findViewById(R.id.play); - this.progressAndPlay = findViewById(R.id.progress_and_play); - this.downloadButton = findViewById(R.id.download); - this.circleProgress = findViewById(R.id.circle_progress); - this.seekBar = findViewById(R.id.seek); - this.duration = findViewById(R.id.duration); + this.controlToggle = findViewById(R.id.control_toggle); + this.playPauseButton = findViewById(R.id.play); + this.progressAndPlay = findViewById(R.id.progress_and_play); + this.downloadContainer = findViewById(R.id.download_container); + this.downloadButton = findViewById(R.id.download); + this.circleProgress = findViewById(R.id.circle_progress); + this.seekBar = findViewById(R.id.seek); + this.duration = findViewById(R.id.duration); lottieDirection = REVERSE; this.playPauseButton.setOnClickListener(new PlayPauseClickedListener()); @@ -168,6 +170,7 @@ public final class AudioView extends FrameLayout { public void setProgressAndPlayBackgroundTint(@ColorInt int color) { progressAndPlay.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN); + downloadContainer.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN); } public Observer getPlaybackStateObserver() { @@ -195,7 +198,7 @@ public final class AudioView extends FrameLayout { } if (showControls && audio.isPendingDownload()) { - controlToggle.displayQuick(downloadButton); + controlToggle.displayQuick(downloadContainer); seekBar.setEnabled(false); downloadButton.setOnClickListener(new DownloadClickedListener(audio)); if (circleProgress != null) { diff --git a/app/src/main/res/layout/audio_view_circle.xml b/app/src/main/res/layout/audio_view_circle.xml index a0fbbe2962..a1da827cb8 100644 --- a/app/src/main/res/layout/audio_view_circle.xml +++ b/app/src/main/res/layout/audio_view_circle.xml @@ -41,16 +41,25 @@ - + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/audio_view_circle_small.xml b/app/src/main/res/layout/audio_view_circle_small.xml index a57d94583a..7f7120f607 100644 --- a/app/src/main/res/layout/audio_view_circle_small.xml +++ b/app/src/main/res/layout/audio_view_circle_small.xml @@ -32,16 +32,25 @@ - + android:visibility="gone"> + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/audio_view_draft_circle.xml b/app/src/main/res/layout/audio_view_draft_circle.xml index 67585aed05..fbcaf328e7 100644 --- a/app/src/main/res/layout/audio_view_draft_circle.xml +++ b/app/src/main/res/layout/audio_view_draft_circle.xml @@ -16,15 +16,6 @@ android:layout_height="match_parent" android:background="@drawable/circle_tintable"> - - - + + + + + \ No newline at end of file