mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-05 08:14:25 +02:00
refactor: remove unnecessary function
This commit is contained in:
parent
8a20d8cf9b
commit
f9831d4da5
@ -1,6 +1,5 @@
|
|||||||
package app.revanced.manager.ui.screen.settings
|
package app.revanced.manager.ui.screen.settings
|
||||||
|
|
||||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
|
||||||
import androidx.compose.foundation.border
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@ -96,7 +95,7 @@ fun ContributorScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalLayoutApi::class, ExperimentalFoundationApi::class)
|
@OptIn(ExperimentalLayoutApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun ContributorsCard(
|
fun ContributorsCard(
|
||||||
title: String,
|
title: String,
|
||||||
@ -131,7 +130,7 @@ fun ContributorsCard(
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = processHeadlineText(title),
|
text = title,
|
||||||
style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.Medium)
|
style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.Medium)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
@ -200,10 +199,3 @@ fun ContributorsCard(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun processHeadlineText(repositoryName: String): String {
|
|
||||||
return repositoryName.replace("revanced/revanced-", "")
|
|
||||||
.replace("-", " ")
|
|
||||||
.split(" ").joinToString(" ") { if (it.length > 3) it else it.uppercase() }
|
|
||||||
.replaceFirstChar { it.uppercase() }
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user