|
|
|
@ -69,11 +69,18 @@ class AttachmentApprovalViewController: UIViewController {
|
|
|
|
|
createImagePreview(attachmentPreviewView:attachmentPreviewView)
|
|
|
|
|
} else if attachment.isVideo {
|
|
|
|
|
createVideoPreview(attachmentPreviewView:attachmentPreviewView)
|
|
|
|
|
} else if attachment.isAudio {
|
|
|
|
|
createAudioPreview(attachmentPreviewView:attachmentPreviewView)
|
|
|
|
|
} else {
|
|
|
|
|
createGenericPreview(attachmentPreviewView:attachmentPreviewView)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func createAudioPreview(attachmentPreviewView: UIView) {
|
|
|
|
|
// TODO: Add audio player.
|
|
|
|
|
createGenericPreview(attachmentPreviewView:attachmentPreviewView)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func createAnimatedPreview(attachmentPreviewView: UIView) {
|
|
|
|
|
// Use Flipboard FLAnimatedImage library to display gifs
|
|
|
|
|
guard let animatedImage = FLAnimatedImage(gifData:attachment.data) else {
|
|
|
|
|