refactor: simplify layout in EpisodeComponents and remove unused modifiers

This commit is contained in:
2026-05-13 19:19:51 +02:00
parent f5d476b28e
commit 56aa16755d
2 changed files with 44 additions and 53 deletions

View File

@@ -4,8 +4,6 @@ import android.Manifest
import android.os.Build import android.os.Build
import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@@ -15,7 +13,6 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel import androidx.hilt.navigation.compose.hiltViewModel
import hu.bbara.purefin.core.download.DownloadState import hu.bbara.purefin.core.download.DownloadState
@@ -119,9 +116,6 @@ private fun EpisodeScreenInternal(
episode = episode, episode = episode,
downloadState = downloadState, downloadState = downloadState,
onDownloadClick = onDownloadClick, onDownloadClick = onDownloadClick,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp)
) )
} }
} }

View File

@@ -1,7 +1,6 @@
package hu.bbara.purefin.ui.screen.episode.components package hu.bbara.purefin.ui.screen.episode.components
import android.content.Intent import android.content.Intent
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
@@ -84,6 +83,7 @@ internal fun EpisodeTopBar(
) )
} }
} }
null -> {} null -> {}
} }
}, },
@@ -103,7 +103,6 @@ internal fun EpisodeDetails(
episode: Episode, episode: Episode,
downloadState: DownloadState, downloadState: DownloadState,
onDownloadClick: () -> Unit, onDownloadClick: () -> Unit,
modifier: Modifier = Modifier
) { ) {
val scheme = MaterialTheme.colorScheme val scheme = MaterialTheme.colorScheme
@@ -116,7 +115,6 @@ internal fun EpisodeDetails(
} }
} }
Column(modifier = modifier) {
MediaSynopsis( MediaSynopsis(
synopsis = episode.synopsis synopsis = episode.synopsis
) )
@@ -170,4 +168,3 @@ internal fun EpisodeDetails(
// ) // )
} }
} }
}