Remove NotificationSettingsScreen
This commit is contained in:
@@ -32,7 +32,6 @@ fun SettingsScreen() {
|
||||
val artistRoute = rememberArtistRoute()
|
||||
val appearanceSettingsRoute = rememberAppearanceSettingsRoute()
|
||||
val playerSettingsRoute = rememberPlayerSettingsRoute()
|
||||
val notificationSettingsRoute = rememberNotificationSettingsRoute()
|
||||
val backupAndRestoreRoute = rememberBackupAndRestoreRoute()
|
||||
val otherSettingsRoute = rememberOtherSettingsRoute()
|
||||
val aboutRoute = rememberAboutRoute()
|
||||
@@ -72,10 +71,6 @@ fun SettingsScreen() {
|
||||
PlayerSettingsScreen()
|
||||
}
|
||||
|
||||
notificationSettingsRoute {
|
||||
NotificationSettingsScreen()
|
||||
}
|
||||
|
||||
backupAndRestoreRoute {
|
||||
BackupAndRestoreScreen()
|
||||
}
|
||||
@@ -186,21 +181,13 @@ fun SettingsScreen() {
|
||||
)
|
||||
|
||||
Entry(
|
||||
color = colorPalette.magenta,
|
||||
color = colorPalette.cyan,
|
||||
icon = R.drawable.play,
|
||||
title = "Player & Audio",
|
||||
description = "Player and audio settings",
|
||||
route = playerSettingsRoute,
|
||||
)
|
||||
|
||||
Entry(
|
||||
color = colorPalette.cyan,
|
||||
icon = R.drawable.notifications,
|
||||
title = "Notification",
|
||||
description = "Customize the notification appearance",
|
||||
route = notificationSettingsRoute
|
||||
)
|
||||
|
||||
Entry(
|
||||
color = colorPalette.orange,
|
||||
icon = R.drawable.server,
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
package it.vfsfitvnm.vimusic.ui.screens.settings
|
||||
|
||||
import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.text.BasicText
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import it.vfsfitvnm.route.RouteHandler
|
||||
import it.vfsfitvnm.vimusic.R
|
||||
import it.vfsfitvnm.vimusic.ui.components.TopAppBar
|
||||
import it.vfsfitvnm.vimusic.ui.screens.*
|
||||
import it.vfsfitvnm.vimusic.ui.styling.LocalColorPalette
|
||||
import it.vfsfitvnm.vimusic.ui.styling.LocalTypography
|
||||
import it.vfsfitvnm.vimusic.utils.LocalPreferences
|
||||
import it.vfsfitvnm.vimusic.utils.semiBold
|
||||
|
||||
@ExperimentalAnimationApi
|
||||
@Composable
|
||||
fun NotificationSettingsScreen() {
|
||||
val albumRoute = rememberPlaylistOrAlbumRoute()
|
||||
val artistRoute = rememberArtistRoute()
|
||||
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
RouteHandler(listenToGlobalEmitter = true) {
|
||||
albumRoute { browseId ->
|
||||
PlaylistOrAlbumScreen(
|
||||
browseId = browseId ?: error("browseId cannot be null")
|
||||
)
|
||||
}
|
||||
|
||||
artistRoute { browseId ->
|
||||
ArtistScreen(
|
||||
browseId = browseId ?: error("browseId cannot be null")
|
||||
)
|
||||
}
|
||||
|
||||
host {
|
||||
val colorPalette = LocalColorPalette.current
|
||||
val typography = LocalTypography.current
|
||||
val preferences = LocalPreferences.current
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.background(colorPalette.background)
|
||||
.fillMaxSize()
|
||||
.verticalScroll(scrollState)
|
||||
.padding(bottom = 72.dp)
|
||||
) {
|
||||
TopAppBar(
|
||||
modifier = Modifier
|
||||
.height(52.dp)
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(R.drawable.chevron_back),
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(colorPalette.text),
|
||||
modifier = Modifier
|
||||
.clickable(onClick = pop)
|
||||
.padding(horizontal = 16.dp, vertical = 8.dp)
|
||||
.size(24.dp)
|
||||
)
|
||||
|
||||
BasicText(
|
||||
text = "Notification",
|
||||
style = typography.m.semiBold
|
||||
)
|
||||
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp, vertical = 8.dp)
|
||||
.size(24.dp)
|
||||
)
|
||||
}
|
||||
|
||||
SwitchSettingEntry(
|
||||
title = "Show Like button",
|
||||
text = "Coming soon!",
|
||||
isChecked = preferences.displayLikeButtonInNotification,
|
||||
onCheckedChange = {
|
||||
preferences.displayLikeButtonInNotification = it
|
||||
},
|
||||
isEnabled = false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,13 +18,6 @@ fun rememberPlayerSettingsRoute(): Route0 {
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun rememberNotificationSettingsRoute(): Route0 {
|
||||
return remember {
|
||||
Route0("NotificationSettingsRoute")
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun rememberBackupAndRestoreRoute(): Route0 {
|
||||
return remember {
|
||||
|
||||
@@ -24,8 +24,6 @@ class Preferences(holder: SharedPreferences) : SharedPreferences by holder {
|
||||
var thumbnailRoundness by preference("thumbnailRoundness", ThumbnailRoundness.Light)
|
||||
var coilDiskCacheMaxSizeBytes by preference("coilDiskCacheMaxSizeBytes", 512L * 1024 * 1024)
|
||||
var exoPlayerDiskCacheMaxSizeBytes by preference("exoPlayerDiskCacheMaxSizeBytes", 512L * 1024 * 1024)
|
||||
var displayLikeButtonInNotification by preference("displayLikeButtonInNotification", false)
|
||||
var persistentQueue by preference("persistentQueue", false)
|
||||
var skipSilence by preference("skipSilence", false)
|
||||
var yourPlaylistsGridRowCount by preference("yourPlaylistsGridRowCount", 2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user