refactor: remove unnecessary function

This commit is contained in:
Ax333l 2024-12-23 13:13:08 +01:00
parent 8a20d8cf9b
commit f9831d4da5
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23

View File

@ -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(
@ -199,11 +198,4 @@ 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() }
} }