mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 00:12:24 +01:00
Media apps keep their own name on the player, NewPipe and TIDAL included
This commit is contained in:
1 parent
afd05ad8c0
commit
62facda5d9
1 file changed
+6
-4
@@ -117,7 +117,7 @@ fun MediaScreen(app: MediaApp, onExit: () -> Unit) {
|
|||||||
CarMedia.Rejection.NEEDS_NOTIFICATION_ACCESS -> Notice(
|
CarMedia.Rejection.NEEDS_NOTIFICATION_ACCESS -> Notice(
|
||||||
stringResource(R.string.media_keeps_library, app.label),
|
stringResource(R.string.media_keeps_library, app.label),
|
||||||
stringResource(R.string.media_needs_access),
|
stringResource(R.string.media_needs_access),
|
||||||
action = stringResource(R.string.media_open_on_phone) to {
|
action = stringResource(R.string.allow_on_phone) to {
|
||||||
val app = context.applicationContext
|
val app = context.applicationContext
|
||||||
runCatching {
|
runCatching {
|
||||||
app.startActivity(
|
app.startActivity(
|
||||||
@@ -260,14 +260,16 @@ fun MediaScreen(app: MediaApp, onExit: () -> Unit) {
|
|||||||
private fun AppIdentity(app: MediaApp, onExit: () -> Unit, modifier: Modifier = Modifier) {
|
private fun AppIdentity(app: MediaApp, onExit: () -> Unit, modifier: Modifier = Modifier) {
|
||||||
val icon = remember(app) { findEntry(app.component.flattenToString())?.icon }
|
val icon = remember(app) { findEntry(app.component.flattenToString())?.icon }
|
||||||
Row(modifier, verticalAlignment = Alignment.CenterVertically) {
|
Row(modifier, verticalAlignment = Alignment.CenterVertically) {
|
||||||
GsIconButton(Icons.Filled.ArrowBack, stringResource(R.string.back), onExit, size = 44.dp)
|
// The same back button as every other screen's header, in the same place.
|
||||||
Spacer(Modifier.width(14.dp))
|
GsIconButton(Icons.Filled.ArrowBack, stringResource(R.string.back), onExit)
|
||||||
|
Spacer(Modifier.width(12.dp))
|
||||||
icon?.let {
|
icon?.let {
|
||||||
Image(it, null, Modifier.size(26.dp).clip(RoundedCornerShape(7.dp)))
|
Image(it, null, Modifier.size(26.dp).clip(RoundedCornerShape(7.dp)))
|
||||||
Spacer(Modifier.width(10.dp))
|
Spacer(Modifier.width(10.dp))
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
app.label.lowercase().replaceFirstChar { it.titlecase() },
|
// As the app writes it: recasing turned NewPipe into "Newpipe" and TIDAL into "Tidal".
|
||||||
|
app.label,
|
||||||
style = MaterialTheme.typography.titleMedium,
|
style = MaterialTheme.typography.titleMedium,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
|||||||
Reference in new issue
Block a user