mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Improve UX around seeing audio wave forms.
- Attempts to generate the wave form on download instead on display - Allows multi-threaded generation of wave forms instead of serial executor
This commit is contained in:
@@ -51,6 +51,7 @@ import org.thoughtcrime.securesms.crypto.ClassicDecryptingPartInputStream;
|
||||
import org.thoughtcrime.securesms.crypto.ModernDecryptingPartInputStream;
|
||||
import org.thoughtcrime.securesms.crypto.ModernEncryptingPartOutputStream;
|
||||
import org.thoughtcrime.securesms.database.model.databaseprotos.AudioWaveFormData;
|
||||
import org.thoughtcrime.securesms.jobs.GenerateAudioWaveFormJob;
|
||||
import org.thoughtcrime.securesms.mms.MediaStream;
|
||||
import org.thoughtcrime.securesms.mms.MmsException;
|
||||
import org.thoughtcrime.securesms.mms.PartAuthority;
|
||||
@@ -656,6 +657,10 @@ public class AttachmentTable extends DatabaseTable {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
transferFile.delete();
|
||||
}
|
||||
|
||||
if (placeholder != null && MediaUtil.isAudio(placeholder)) {
|
||||
GenerateAudioWaveFormJob.enqueue(placeholder.getAttachmentId());
|
||||
}
|
||||
}
|
||||
|
||||
private static @Nullable String getVisualHashStringOrNull(@Nullable Attachment attachment) {
|
||||
|
||||
Reference in New Issue
Block a user