mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Refresh media selection and sending flow with a shiny new UX.
This commit is contained in:
committed by
Greyson Parrelli
parent
a940487611
commit
664d6475d9
@@ -0,0 +1,23 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import android.view.animation.Animation
|
||||
|
||||
fun Animation.setListeners(
|
||||
onAnimationStart: (animation: Animation?) -> Unit = { },
|
||||
onAnimationEnd: (animation: Animation?) -> Unit = { },
|
||||
onAnimationRepeat: (animation: Animation?) -> Unit = { }
|
||||
) {
|
||||
this.setAnimationListener(object : Animation.AnimationListener {
|
||||
override fun onAnimationStart(animation: Animation?) {
|
||||
onAnimationStart(animation)
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animation?) {
|
||||
onAnimationEnd(animation)
|
||||
}
|
||||
|
||||
override fun onAnimationRepeat(animation: Animation?) {
|
||||
onAnimationRepeat(animation)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.attachments.Attachment;
|
||||
import org.thoughtcrime.securesms.attachments.AttachmentId;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.mediasend.Media;
|
||||
import org.thoughtcrime.securesms.mms.AudioSlide;
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader.DecryptableUri;
|
||||
import org.thoughtcrime.securesms.mms.DocumentSlide;
|
||||
@@ -283,6 +284,10 @@ public class MediaUtil {
|
||||
return (null != contentType) && contentType.startsWith("text/");
|
||||
}
|
||||
|
||||
public static boolean isNonGifVideo(Media media) {
|
||||
return isVideo(media.getMimeType()) && !media.isVideoGif();
|
||||
}
|
||||
|
||||
public static boolean isImageType(String contentType) {
|
||||
if (contentType == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user