Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -19,7 +19,6 @@ package io.element.android.libraries.mediaviewer.api.local
|
|||
import androidx.compose.runtime.Composable
|
||||
|
||||
interface LocalMediaActions {
|
||||
|
||||
@Composable
|
||||
fun Configure()
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import android.net.Uri
|
|||
import io.element.android.libraries.matrix.api.media.MediaFile
|
||||
|
||||
interface LocalMediaFactory {
|
||||
|
||||
/**
|
||||
* This method will create a [LocalMedia] with the given [MediaFile] and [MediaInfo].
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import androidx.media3.exoplayer.ExoPlayer
|
|||
*/
|
||||
@UnstableApi
|
||||
class ExoPlayerWrapper(private val exoPlayer: ExoPlayer) : ExoPlayer by exoPlayer {
|
||||
|
||||
override fun isCommandAvailable(command: Int): Boolean {
|
||||
return availableCommands.contains(command)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import android.os.ParcelFileDescriptor
|
|||
import java.io.File
|
||||
|
||||
class ParcelFileDescriptorFactory(private val context: Context) {
|
||||
|
||||
fun create(model: Any?) = runCatching {
|
||||
when (model) {
|
||||
is File -> ParcelFileDescriptor.open(model, ParcelFileDescriptor.MODE_READ_ONLY)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ class PdfPage(
|
|||
private val pdfRenderer: PdfRenderer,
|
||||
private val coroutineScope: CoroutineScope,
|
||||
) {
|
||||
|
||||
sealed interface State {
|
||||
data class Loading(val width: Int, val height: Int) : State
|
||||
data class Loaded(val bitmap: Bitmap) : State
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class PdfRendererManager(
|
|||
private val width: Int,
|
||||
private val coroutineScope: CoroutineScope,
|
||||
) {
|
||||
|
||||
private val mutex = Mutex()
|
||||
private var pdfRenderer: PdfRenderer? = null
|
||||
private val mutablePdfPages = MutableStateFlow<List<PdfPage>>(emptyList())
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ private fun PdfPagesView(
|
|||
modifier = modifier.fillMaxSize(),
|
||||
state = lazyListState,
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp, Alignment.CenterVertically)
|
||||
|
||||
) {
|
||||
items(pdfPages.size) { index ->
|
||||
val pdfPage = pdfPages[index]
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class PdfViewerState(
|
|||
val zoomableState: ZoomableState,
|
||||
val lazyListState: LazyListState,
|
||||
) {
|
||||
|
||||
var isLoaded by mutableStateOf(false)
|
||||
private var pdfRendererManager by mutableStateOf<PdfRendererManager?>(null)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ open class MediaViewerNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
presenterFactory: MediaViewerPresenter.Factory,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
data class Inputs(
|
||||
val mediaInfo: MediaInfo,
|
||||
val mediaSource: MediaSource,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ class MediaViewerPresenter @AssistedInject constructor(
|
|||
private val localMediaActions: LocalMediaActions,
|
||||
private val snackbarDispatcher: SnackbarDispatcher,
|
||||
) : Presenter<MediaViewerState> {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(inputs: MediaViewerNode.Inputs): MediaViewerPresenter
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ import org.junit.Test
|
|||
private val TESTED_MEDIA_INFO = aFileInfo()
|
||||
|
||||
class MediaViewerPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue