mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Fix moar ktlint issues
This commit is contained in:
committed by
Benoit Marty
parent
a831f05f6e
commit
5d086ad82d
-1
@@ -61,7 +61,6 @@ class ThumbnailFactory @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
private val sdkIntProvider: BuildVersionSdkIntProvider
|
||||
) {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
suspend fun createImageThumbnail(file: File): ThumbnailResult? {
|
||||
return createThumbnail { cancellationSignal ->
|
||||
|
||||
-1
@@ -33,7 +33,6 @@ import javax.inject.Inject
|
||||
class VideoCompressor @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
) {
|
||||
|
||||
fun compress(uri: Uri) = callbackFlow {
|
||||
val tmpFile = context.createTmpFile(extension = "mp4")
|
||||
val future = Transcoder.into(tmpFile.path)
|
||||
|
||||
+10
-5
@@ -230,7 +230,8 @@ class AndroidMediaPreProcessorTest {
|
||||
assertThat(info.thumbnailFile).isNotNull()
|
||||
assertThat(info.videoInfo).isEqualTo(
|
||||
VideoInfo(
|
||||
duration = Duration.ZERO, // Not available with Robolectric?
|
||||
// Not available with Robolectric?
|
||||
duration = Duration.ZERO,
|
||||
height = 1_178,
|
||||
width = 1_818,
|
||||
mimetype = MimeTypes.Mp4,
|
||||
@@ -260,9 +261,12 @@ class AndroidMediaPreProcessorTest {
|
||||
assertThat(info.thumbnailFile).isNull()
|
||||
assertThat(info.videoInfo).isEqualTo(
|
||||
VideoInfo(
|
||||
duration = Duration.ZERO, // Not available with Robolectric?
|
||||
height = 0, // Not available with Robolectric?
|
||||
width = 0, // Not available with Robolectric?
|
||||
// Not available with Robolectric?
|
||||
duration = Duration.ZERO,
|
||||
// Not available with Robolectric?
|
||||
height = 0,
|
||||
// Not available with Robolectric?
|
||||
width = 0,
|
||||
mimetype = MimeTypes.Mp4,
|
||||
size = 1_673_712,
|
||||
thumbnailInfo = null,
|
||||
@@ -288,7 +292,8 @@ class AndroidMediaPreProcessorTest {
|
||||
val info = result as MediaUploadInfo.Audio
|
||||
assertThat(info.audioInfo).isEqualTo(
|
||||
AudioInfo(
|
||||
duration = Duration.ZERO, // Not available with Robolectric?
|
||||
// Not available with Robolectric?
|
||||
duration = Duration.ZERO,
|
||||
size = 52_079,
|
||||
mimetype = MimeTypes.Mp3,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user