Move OtherSettingsScreen to CacheSettingsScreen

This commit is contained in:
vfsfitvnm
2022-07-01 14:42:20 +02:00
parent 7c165b5c3a
commit 03333cd157
7 changed files with 33 additions and 59 deletions

View File

@@ -34,7 +34,7 @@ fun SettingsScreen() {
val appearanceSettingsRoute = rememberAppearanceSettingsRoute()
val playerSettingsRoute = rememberPlayerSettingsRoute()
val backupAndRestoreRoute = rememberBackupAndRestoreRoute()
val otherSettingsRoute = rememberOtherSettingsRoute()
val cacheSettingsRoute = rememberCacheSettingsRoute()
val aboutRoute = rememberAboutRoute()
val scrollState = rememberScrollState()
@@ -76,8 +76,8 @@ fun SettingsScreen() {
BackupAndRestoreScreen()
}
otherSettingsRoute {
OtherSettingsScreen()
cacheSettingsRoute {
CacheSettingsScreen()
}
aboutRoute {
@@ -174,7 +174,7 @@ fun SettingsScreen() {
}
Entry(
color = colorPalette.blue,
color = colorPalette.magenta,
icon = R.drawable.color_palette,
title = "Appearance",
description = "Change the colors and shapes of the app",
@@ -182,7 +182,7 @@ fun SettingsScreen() {
)
Entry(
color = colorPalette.cyan,
color = colorPalette.blue,
icon = R.drawable.play,
title = "Player & Audio",
description = "Player and audio settings",
@@ -190,19 +190,19 @@ fun SettingsScreen() {
)
Entry(
color = colorPalette.orange,
color = colorPalette.cyan,
icon = R.drawable.server,
title = "Backup & Restore",
description = "Backup and restore the app database",
route = backupAndRestoreRoute
title = "Cache",
description = "Manage the used space",
route = cacheSettingsRoute
)
Entry(
color = colorPalette.magenta,
icon = R.drawable.shapes,
title = "Other",
description = "Advanced options",
route = otherSettingsRoute
color = colorPalette.orange,
icon = R.drawable.save,
title = "Backup & Restore",
description = "Backup and restore the app database",
route = backupAndRestoreRoute
)
Entry(
@@ -408,7 +408,7 @@ fun SettingsEntryGroupText(
BasicText(
text = title.uppercase(),
style = typography.xs.semiBold,
style = typography.xs.semiBold.copy(LocalColorPalette.current.blue),
modifier = modifier
.padding(start = 24.dp, top = 24.dp)
.padding(horizontal = 32.dp)

View File

@@ -32,7 +32,7 @@ import kotlinx.coroutines.launch
@OptIn(ExperimentalCoilApi::class)
@ExperimentalAnimationApi
@Composable
fun OtherSettingsScreen() {
fun CacheSettingsScreen() {
val albumRoute = rememberAlbumRoute()
val artistRoute = rememberArtistRoute()
@@ -82,7 +82,7 @@ fun OtherSettingsScreen() {
)
BasicText(
text = "Other",
text = "Cache",
style = typography.m.semiBold
)
@@ -102,11 +102,7 @@ fun OtherSettingsScreen() {
mutableStateOf<Long?>(null)
}
SettingsEntryGroupText(
icon = R.drawable.image,
iconColor = colorPalette.green,
title = "IMAGE CACHE",
)
SettingsEntryGroupText(title = "IMAGE CACHE")
Column(
modifier = Modifier
@@ -175,11 +171,7 @@ fun OtherSettingsScreen() {
mutableStateOf<Long?>(null)
}
SettingsEntryGroupText(
icon = R.drawable.musical_notes,
iconColor = colorPalette.cyan,
title = "SONG CACHE",
)
SettingsEntryGroupText(title = "SONG CACHE")
Column(
modifier = Modifier

View File

@@ -26,9 +26,9 @@ fun rememberBackupAndRestoreRoute(): Route0 {
}
@Composable
fun rememberOtherSettingsRoute(): Route0 {
fun rememberCacheSettingsRoute(): Route0 {
return remember {
Route0("OtherSettingsRoute")
Route0("CacheSettingsRoute")
}
}

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M416,64L96,64a64.07,64.07 0,0 0,-64 64L32,384a64.07,64.07 0,0 0,64 64L416,448a64.07,64.07 0,0 0,64 -64L480,128A64.07,64.07 0,0 0,416 64ZM336,128a48,48 0,1 1,-48 48A48.05,48.05 0,0 1,336 128ZM96,416a32,32 0,0 1,-32 -32L64,316.37l94.84,-84.3a48.06,48.06 0,0 1,65.8 1.9l64.95,64.81L172.37,416ZM448,384a32,32 0,0 1,-32 32L217.63,416L339.05,294.58a47.72,47.72 0,0 1,61.64 -0.16L448,333.84Z"/>
</vector>

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M421.84,37.37a25.86,25.86 0,0 0,-22.6 -4.46L199.92,86.49A32.3,32.3 0,0 0,176 118v226c0,6.74 -4.36,12.56 -11.11,14.83l-0.12,0.05 -52,18C92.88,383.53 80,402 80,423.91a55.54,55.54 0,0 0,23.23 45.63A54.78,54.78 0,0 0,135.34 480a55.82,55.82 0,0 0,17.75 -2.93l0.38,-0.13L175.31,469A47.84,47.84 0,0 0,208 423.91v-212c0,-7.29 4.77,-13.21 12.16,-15.07l0.21,-0.06L395,150.14a4,4 0,0 1,5 3.86V295.93c0,6.75 -4.25,12.38 -11.11,14.68l-0.25,0.09 -50.89,18.11A49.09,49.09 0,0 0,304 375.92a55.67,55.67 0,0 0,23.23 45.8,54.63 54.63,0 0,0 49.88,7.35l0.36,-0.12L399.31,421A47.83,47.83 0,0 0,432 375.92V58A25.74,25.74 0,0 0,421.84 37.37Z"/>
</vector>

View File

@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M465.94,119.76l-73.7,-73.7h0A47.68,47.68 0,0 0,358.3 32H96A64,64 0,0 0,32 96V416a64,64 0,0 0,64 64H416a64,64 0,0 0,64 -64V153.7A47.68,47.68 0,0 0,465.94 119.76ZM120,112H296a8,8 0,0 1,8 8v48a8,8 0,0 1,-8 8H120a8,8 0,0 1,-8 -8V120A8,8 0,0 1,120 112ZM259.75,431.91a80,80 0,1 1,76.16 -76.16A80.06,80.06 0,0 1,259.75 431.91Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M256,352m-48,0a48,48 0,1 1,96 0a48,48 0,1 1,-96 0"/>
</vector>

View File

@@ -1,12 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:fillColor="#FF000000"
android:pathData="M336,336H32a16,16 0,0 1,-14 -23.81l152,-272a16,16 0,0 1,27.94 0l152,272A16,16 0,0 1,336 336Z"/>
<path
android:fillColor="#FF000000"
android:pathData="M336,160a161.07,161.07 0,0 0,-32.57 3.32L377.9,296.59A48,48 0,0 1,336 368H183.33A160,160 0,1 0,336 160Z"/>
</vector>