Skip to content

Commit

Permalink
Rename FileTileList into FileItemList
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Oct 16, 2024
1 parent d47b8d3 commit 49bce1b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private fun FileItemContent(
.align(Alignment.TopEnd),
contentPadding = PaddingValues(0.dp),
shape = CircleShape,
colors = ButtonDefaults.buttonColors(containerColor = SwissTransferTheme.colors.fileTileRemoveButtonBackground),
colors = ButtonDefaults.buttonColors(containerColor = SwissTransferTheme.colors.fileItemRemoveButtonBackground),
onClick = onRemove ?: {},
) {
Icon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow
import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow

@Composable
fun FileTileList(
fun FileItemList(
modifier: Modifier = Modifier,
files: List<FileUiItem>,
isRemoveButtonVisible: Boolean,
Expand Down Expand Up @@ -61,7 +61,7 @@ fun FileTileList(
@PreviewSmallWindow
@PreviewLargeWindow
@Composable
private fun FileTileListPreview() {
private fun FileItemListPreview() {
val files = listOf(object : FileUiItem {
override val fileName: String = "The 5-Step Guide to Not Breaking Your Code.txt"
override val uid: String = fileName
Expand All @@ -83,7 +83,7 @@ private fun FileTileListPreview() {
})

SwissTransferTheme {
FileTileList(
FileItemList(
files = files,
isRemoveButtonVisible = false,
isCheckboxVisible = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.components.EmptyState
import com.infomaniak.swisstransfer.ui.components.FileUiItem
import com.infomaniak.swisstransfer.ui.components.FileTileList
import com.infomaniak.swisstransfer.ui.components.FileItemList
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.illus.MascotSearching
import com.infomaniak.swisstransfer.ui.screen.main.components.BrandTopAppBarScaffold
Expand Down Expand Up @@ -91,7 +91,7 @@ private fun ReceivedScreen(
override val mimeType: String? = null
override val uri: String = ""
})
FileTileList(
FileItemList(
modifier = Modifier.padding(Margin.Medium),
files = files,
isRemoveButtonVisible = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.infomaniak.swisstransfer.ui.components.FileUiItem
import com.infomaniak.swisstransfer.ui.components.FileTileList
import com.infomaniak.swisstransfer.ui.components.FileItem
import com.infomaniak.swisstransfer.ui.components.FileItemList
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.PreviewLargeWindow
Expand All @@ -50,7 +49,7 @@ fun SentListScreen(transfers: List<Any>) {
override val mimeType: String? = null
override val uri: String = ""
})
FileTileList(
FileItemList(
modifier = Modifier.padding(Margin.Medium),
files = transfers,
isRemoveButtonVisible = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ val CustomDarkColorScheme = CustomColorScheme(
navigationItemBackground = Color(dark2),
tertiaryButtonBackground = Color(dark2),
selectedSettingItem = Color(dark2),
fileTileRemoveButtonBackground = Color(black_translucent),
fileItemRemoveButtonBackground = Color(black_translucent),
transferTypeLinkContainer = Color(specific1),
transferTypeLinkOnContainer = Color(green_main),
transferTypeEmailContainer = Color(green_dark),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ val CustomLightColorScheme = CustomColorScheme(
navigationItemBackground = LightColorScheme.background,
tertiaryButtonBackground = Color(rabbit),
selectedSettingItem = Color(rabbit),
fileTileRemoveButtonBackground = Color(black_translucent),
fileItemRemoveButtonBackground = Color(black_translucent),
transferTypeLinkContainer = Color(specific1),
transferTypeLinkOnContainer = Color(green_main),
transferTypeEmailContainer = Color(specific2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ data class CustomColorScheme(
val navigationItemBackground: Color = Color.Unspecified,
val tertiaryButtonBackground: Color = Color.Unspecified,
val selectedSettingItem: Color = Color.Unspecified,
val fileTileRemoveButtonBackground: Color = Color.Unspecified,
val fileItemRemoveButtonBackground: Color = Color.Unspecified,
val transferTypeLinkContainer: Color = Color.Unspecified,
val transferTypeLinkOnContainer: Color = Color.Unspecified,
val transferTypeEmailContainer: Color = Color.Unspecified,
Expand Down

0 comments on commit 49bce1b

Please sign in to comment.